From 526c00a8170398144babaca0101e767a3e1b806c Mon Sep 17 00:00:00 2001 From: duongtd Date: Thu, 13 Aug 2026 15:02:06 +0700 Subject: [PATCH] Stop linking Boost directly from the projection test The test target listed Boost::system and Boost::thread while this package never calls find_package(Boost). The imported targets only existed because another subdirectory happened to be configured first, so CMake passed the literal strings through and the link failed with "cannot find -lBoost::system" whenever that ordering did not hold. The test does not use Boost itself; whatever it needs arrives through the library it links. Dropping the two entries removes the ordering dependency. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 739397b..6b0f2fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,11 +175,10 @@ if(BUILD_TESTING) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/projection_test.cpp) add_executable(${PROJECT_NAME}_test test/projection_test.cpp) - target_link_libraries(${PROJECT_NAME}_test PRIVATE + target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME} GTest::GTest GTest::Main - Boost::system Boost::thread ${TF3_LIBRARY} ) add_test(NAME ${PROJECT_NAME}_test COMMAND ${PROJECT_NAME}_test)