From 5e1dd04afe1859f5a4e89862ceb039820960c27a Mon Sep 17 00:00:00 2001 From: Dima Korolev Date: Wed, 31 Jul 2024 12:19:00 +0200 Subject: [PATCH] Reverted most changes, just keeping the `.inl` pre-build script now. --- cmake/CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7b771a4c..89e01d2d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -149,11 +149,7 @@ foreach(LIBRARY_SOURCE_FILE ${LIBRARY_SOURCE_FILES}) target_include_directories(${LIBRARY_TARGET_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/inc" ${C5T_DEP_DIR_current}) set(USR_LIBRARIES_WO_SELF "${USR_LIBRARIES}") list(REMOVE_ITEM USR_LIBRARIES_WO_SELF ${LIBRARY_TARGET_NAME}) - if(APPLE) - target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES_WO_SELF}") - else() - target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES_WO_SELF}") - endif() + target_link_libraries(${LIBRARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES_WO_SELF}") endforeach() # Declare binaries as binary targets. And link them against all the libraries. @@ -166,11 +162,7 @@ foreach(BINARY_SOURCE_FILE ${BINARY_SOURCE_FILES}) target_compile_definitions(${BINARY_TARGET_NAME} PRIVATE C5T_CMAKE_PROJECT) target_include_directories(${BINARY_TARGET_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/inc") target_link_libraries(${BINARY_TARGET_NAME} PRIVATE "${C5T_LIBRARIES}") - if(APPLE) - target_link_libraries(${BINARY_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES}") - else() - target_link_libraries(${BINARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES}") - endif() + target_link_libraries(${BINARY_TARGET_NAME} PRIVATE "${USR_LIBRARIES}") endif() endforeach() @@ -183,10 +175,6 @@ foreach(TEST_SOURCE_FILE ${TEST_SOURCE_FILES}) add_dependencies(${TEST_TARGET_NAME} C5T_CURRENT_BUILD_INFO_H_TARGET C5T_CUSTOM_PER_BUILD_SCRIPT_TARGET) target_include_directories(${TEST_TARGET_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/inc") target_link_libraries(${TEST_TARGET_NAME} PRIVATE gtest_main "${C5T_LIBRARIES}") - if (APPLE) - target_link_libraries(${TEST_TARGET_NAME} PRIVATE -Wl,-force_load "${USR_LIBRARIES}") - else() - target_link_libraries(${TEST_TARGET_NAME} PRIVATE "${USR_LIBRARIES}") - endif() + target_link_libraries(${TEST_TARGET_NAME} PRIVATE "${USR_LIBRARIES}") add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME}) endforeach()