Skip to content

Commit

Permalink
Back to a "simple" CMakeLists.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorolev committed Jul 30, 2024
1 parent 6ecf7a1 commit 0a3315a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ foreach(LIBRARY_SOURCE_FILE ${LIBRARY_SOURCE_FILES})
if(APPLE)
target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES_WO_SELF}")
else()
target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE -Wl,--whole-archive "${USR_LIBRARIES_WO_SELF}" -Wl,--no-whole-archive,--allow-multiple-definition)
target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES_WO_SELF}")
endif()
endforeach()

Expand All @@ -169,7 +169,7 @@ foreach(BINARY_SOURCE_FILE ${BINARY_SOURCE_FILES})
if(APPLE)
target_link_libraries(${BINARY_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES}")
else()
target_link_libraries(${BINARY_TARGET_NAME} PRIVATE -Wl,--whole-archive "${USR_LIBRARIES}" -Wl,--no-whole-archive,--allow-multiple-definition)
target_link_libraries(${BINARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES}")
endif()
endif()
endforeach()
Expand All @@ -186,7 +186,7 @@ foreach(TEST_SOURCE_FILE ${TEST_SOURCE_FILES})
if (APPLE)
target_link_libraries(${TEST_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES}")
else()
target_link_libraries(${TEST_TARGET_NAME} PRIVATE -Wl,--whole-archive "${USR_LIBRARIES}" -Wl,--no-whole-archive)
target_link_libraries(${TEST_TARGET_NAME} PRIVATE "${USR_LIBRARIES}")
endif()
add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME})
endforeach()

0 comments on commit 0a3315a

Please sign in to comment.