From 2fd0248e37614b52bf55c8ff3e3dc187262a603d 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 3947ca9f7..a07939f1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,11 +92,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 ----------------------------------------------------------