From 29d63425172855e0a873ef901b1a0c671b6905e0 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 25 Nov 2025 08:29:45 +0100 Subject: [PATCH] deal with Boost 1.89 not having system as component anymore. --- CMakeLists.txt | 18 +++++++++++++----- src/external/Nonlocal/prog/CMakeLists.txt | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf51b2d8..fed817a40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,11 +93,19 @@ endif () set(ROOT_GRTEQ_24 ${ROOT_GRTEQ_24} CACHE INTERNAL "ROOT Version check") #--- check for boost ---------------------------------------------------------- -find_package(Boost REQUIRED - COMPONENTS - system - filesystem -) +find_package(Boost QUIET) +if (Boost_VERSION VERSION_GREATER_EQUAL "1.89") + find_package(Boost REQUIRED + COMPONENTS + filesystem + ) +else (Boost_VERSION VERSION_GREATER_EQUAL "1.89") + find_package(Boost REQUIRED + COMPONENTS + system + filesystem + ) +endif (Boost_VERSION VERSION_GREATER_EQUAL "1.89") message(STATUS "Boost libs: ${Boost_LIBRARIES}") #--- check for gsl ------------------------------------------------------------ diff --git a/src/external/Nonlocal/prog/CMakeLists.txt b/src/external/Nonlocal/prog/CMakeLists.txt index f5213f075..1c36c0d05 100644 --- a/src/external/Nonlocal/prog/CMakeLists.txt +++ b/src/external/Nonlocal/prog/CMakeLists.txt @@ -22,11 +22,19 @@ if (ROOT_mathmore_FOUND) endif (ROOT_mathmore_FOUND) #--- check for boost ---------------------------------------------------------- -find_package(Boost REQUIRED - COMPONENTS - system - filesystem -) +find_package(Boost QUIET) +if (Boost_VERSION VERSION_GREATER_EQUAL "1.89") + find_package(Boost REQUIRED + COMPONENTS + filesystem + ) +else (Boost_VERSION VERSION_GREATER_EQUAL "1.89") + find_package(Boost REQUIRED + COMPONENTS + system + filesystem + ) +endif (Boost_VERSION VERSION_GREATER_EQUAL "1.89") message(STATUS "Boost libs: ${Boost_LIBRARIES}") #--- check for fftw3 ----------------------------------------------------------