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:
@ -29,7 +29,8 @@ PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${MY_PROTOS})
|
||||
|
||||
## Build library
|
||||
add_library(fail-${EXPERIMENT_NAME} ${PROTO_SRCS} ${PROTO_HDRS} ${MY_CAMPAIGN_SRCS})
|
||||
add_dependencies(fail-${EXPERIMENT_NAME} fail-tracing fail-comm)
|
||||
add_dependencies(fail-${EXPERIMENT_NAME} fail-comm)
|
||||
target_link_libraries(fail-${EXPERIMENT_NAME} fail-tracing fail-comm)
|
||||
target_link_libraries(fail-${EXPERIMENT_NAME} ${PROTOBUF_LIBRARY} ${MYSQL_LIBRARIES})
|
||||
|
||||
## This is the example's campaign server distributing experiment parameters
|
||||
|
||||
Reference in New Issue
Block a user