Clean up the src/ cmakefiles
This commit is contained in:
parent
2dca8e812e
commit
2634fdb5f4
|
@ -77,7 +77,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
-Werror
|
-Werror
|
||||||
-fno-rtti
|
-fno-rtti
|
||||||
-fno-builtin-strlen
|
-fno-builtin-strlen
|
||||||
|
-flto=thin
|
||||||
# Dedicate a section to each function, so the linker
|
# Dedicate a section to each function, so the linker
|
||||||
# can do a better job on dead code elimination
|
# can do a better job on dead code elimination
|
||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
|
|
|
@ -124,8 +124,6 @@ set(static_deps
|
||||||
|
|
||||||
set_target_properties(libserene PROPERTIES StaticDeps "${static_deps}")
|
set_target_properties(libserene PROPERTIES StaticDeps "${static_deps}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create an ALIAS target. This way if we mess up the name
|
# Create an ALIAS target. This way if we mess up the name
|
||||||
# there will be an cmake error inseat of a linker error which is harder
|
# there will be an cmake error inseat of a linker error which is harder
|
||||||
# to understand. So any binary that wants to use libserene has to
|
# to understand. So any binary that wants to use libserene has to
|
||||||
|
|
|
@ -29,7 +29,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_property(serene_lib_deps TARGET Serene::lib PROPERTY StaticDeps)
|
get_property(serene_lib_deps TARGET Serene::lib PROPERTY StaticDeps)
|
||||||
set(serenec_deps
|
|
||||||
|
target_link_libraries(serenec
|
||||||
|
PRIVATE
|
||||||
${serene_lib_deps}
|
${serene_lib_deps}
|
||||||
LLVMX86AsmParser
|
LLVMX86AsmParser
|
||||||
LLVMTarget
|
LLVMTarget
|
||||||
|
@ -43,13 +45,6 @@ set(serenec_deps
|
||||||
clangLex
|
clangLex
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "ooooooo ${serene_lib_deps}")
|
|
||||||
message(STATUS "ooooooo ${serenec_deps}")
|
|
||||||
|
|
||||||
target_link_libraries(serenec PUBLIC
|
|
||||||
${serenec_deps}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(serenec PRIVATE ${PROJECT_BINARY_DIR})
|
target_include_directories(serenec PRIVATE ${PROJECT_BINARY_DIR})
|
||||||
target_include_directories(serenec PRIVATE ${INCLUDE_DIR})
|
target_include_directories(serenec PRIVATE ${INCLUDE_DIR})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue