From a946fc8e3e22d7a023482d78c1a68cf10e0e5f17 Mon Sep 17 00:00:00 2001 From: "Jeremy W. Murphy" Date: Mon, 27 Oct 2025 04:13:48 +0900 Subject: [PATCH] Move Boost::crc and Boost::program_options dependencies in cmake from library to unit and robustness tests (#1437) --- CMakeLists.txt | 2 -- test/CMakeLists.txt | 6 ++++++ test/robustness/CMakeLists.txt | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b0384e1d..c4a34cfa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,6 @@ target_link_libraries(boost_geometry Boost::concept_check Boost::config Boost::core - Boost::crc Boost::function_types Boost::graph Boost::iterator @@ -34,7 +33,6 @@ target_link_libraries(boost_geometry Boost::mpl Boost::multiprecision Boost::numeric_conversion - Boost::program_options Boost::qvm Boost::range Boost::rational diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3836548f7..dc7e7ce56 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,6 +31,12 @@ function(boost_geometry_add_unit_test prefix item) PRIVATE Boost::included_unit_test_framework) + # At least one unit test uses the crc library (but the Geometry library does not). + target_link_libraries(${unit_test_name} + PRIVATE + Boost::crc + Boost::program_options) + # Include the main Geometry test folder and the current folder target_include_directories(${unit_test_name} PRIVATE diff --git a/test/robustness/CMakeLists.txt b/test/robustness/CMakeLists.txt index 60ce71d61..723f73f7a 100644 --- a/test/robustness/CMakeLists.txt +++ b/test/robustness/CMakeLists.txt @@ -15,6 +15,12 @@ function(boost_geometry_add_robustness_test item) PRIVATE Boost::geometry) + # Link to additional libraries required for testing. + target_link_libraries(${robustness_test_name} + PRIVATE + Boost::crc + Boost::program_options) + # Include the main Geometry test folder and the current folder, # and the robustness test folder target_include_directories(${robustness_test_name}