From 05c9c0060ec8ff4cbf8619ff74724c2eea426d84 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 8 Sep 2020 16:43:36 +0200 Subject: CMake > 3.5 to use Boost targets. Compile only what is available from boost targets --- src/cmake/modules/GUDHI_modules.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/cmake/modules/GUDHI_modules.cmake') diff --git a/src/cmake/modules/GUDHI_modules.cmake b/src/cmake/modules/GUDHI_modules.cmake index aab1dd08..ccaf1ac5 100644 --- a/src/cmake/modules/GUDHI_modules.cmake +++ b/src/cmake/modules/GUDHI_modules.cmake @@ -30,7 +30,12 @@ if (WITH_GUDHI_EXAMPLE) set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};example") endif() if (WITH_GUDHI_TEST) - set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};test") + # All tests are using boost tests + if(TARGET Boost::unit_test_framework) + set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};test") + else() + message("++ WITH_GUDHI_TEST but no TARGET Boost::unit_test_framework") + endif() endif() if (WITH_GUDHI_UTILITIES) set(GUDHI_SUB_DIRECTORIES "${GUDHI_SUB_DIRECTORIES};utilities") -- cgit v1.2.3