Skip to content

Commit

Permalink
Reverted most changes, just keeping the .inl pre-build script now.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorolev committed Jul 31, 2024
1 parent 2c67c93 commit 5e1dd04
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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()

Expand All @@ -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()

0 comments on commit 5e1dd04

Please sign in to comment.