From 94eaa2257a6038ceffe4e440725cea590d6ede5f Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Wed, 29 Oct 2025 20:52:05 +0100 Subject: [PATCH 1/2] Add compatibility with Boost 1.89 Only add Boost.system to link libraries for version < 1.69 where it is not a header only library Signed-off-by: Kai-Uwe Hermann --- CMakeLists.txt | 9 ++++++++- lib/CMakeLists.txt | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13b475e1..0cdd5e6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,11 +43,18 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(Boost COMPONENTS program_options - system thread REQUIRED ) +if(Boost_VERSION_STRING VERSION_LESS "1.69.0") + find_package(Boost + COMPONENTS + system + REQUIRED + ) +endif() + find_package(PkgConfig REQUIRED) pkg_check_modules(libcap REQUIRED diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 5018dfd8..a0288315 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -63,6 +63,10 @@ target_include_directories(framework $ ) +if(Boost_VERSION_STRING VERSION_LESS "1.69.0") + set(EVEREST_FRAMEWORK_BOOST_SYSTEM_LINK_LIBRARY Boost::system) +endif() + target_link_libraries(framework PUBLIC date::date-tz @@ -74,7 +78,7 @@ target_link_libraries(framework everest::sqlite ${STD_FILESYSTEM_COMPAT_LIB} PRIVATE - Boost::system + ${EVEREST_FRAMEWORK_BOOST_SYSTEM_LINK_LIBRARY} Boost::thread Boost::program_options mqttc From a017aff03e60ed97e08f03477d295614eecc8faf Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Wed, 29 Oct 2025 20:56:19 +0100 Subject: [PATCH 2/2] Set CMake policy 167 to OLD to keep uswing the removed FindBoost module Signed-off-by: Kai-Uwe Hermann --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cdd5e6e..e8744d21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,11 @@ endif() # make own cmake modules available list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +# this policy allows us to continue using the removed FindBoost module for now +if(POLICY CMP0167) + cmake_policy(SET CMP0167 OLD) +endif() + # dependencies find_package(Boost COMPONENTS