cmake: static library dependencies
CMake does not support linker groups, which were used to "automatically" fix circular dependencies between different static FAIL* libraries and the ordering of dynamic external libraries broke linking. CMake can however correctly invoke the linker if dependencies are decribed correctly (even if circular). This required changing all add_dependencies calls between libraries to target_link_libraries (which creates a link-time dependency) and linking all experiments to fail-sal. Change-Id: I3a0d5dddb9b3d963ef538814e20d6b3de85d4ec5
This commit is contained in:
@ -15,7 +15,7 @@ include(FindLLVM)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS} -fno-rtti" )
|
||||
|
||||
add_library(fail-llvmdisassembler ${SRCS})
|
||||
add_dependencies(fail-llvmdisassembler fail-sal)
|
||||
target_link_libraries(fail-llvmdisassembler fail-sal)
|
||||
target_link_libraries(fail-llvmdisassembler ${LLVM_LIBS} ${LLVM_LDFLAGS} )
|
||||
|
||||
### Tests
|
||||
|
||||
Reference in New Issue
Block a user