From 75ccd099314cb4f93eefb179f9df3d4ad7128efb Mon Sep 17 00:00:00 2001 From: Tom Jakubowski Date: Sun, 29 Sep 2024 12:17:23 -0700 Subject: [PATCH] add boost policy for cmake 3.30 Signed-off-by: Tom Jakubowski --- cpp/perspective/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/perspective/CMakeLists.txt b/cpp/perspective/CMakeLists.txt index 7829f0fa22..8fc706a049 100644 --- a/cpp/perspective/CMakeLists.txt +++ b/cpp/perspective/CMakeLists.txt @@ -22,6 +22,14 @@ cmake_policy(SET CMP0074 NEW) # instead of the latest version installed. cmake_policy(SET CMP0094 NEW) +# https://cmake.org/cmake/help/latest/policy/CMP0167.html +# cmake deprecated their built-in FindBoost module in favor of one provided by Boost. +# The OLD behavior of this policy is for find_package(Boost) to load CMake's FindBoost module. +# The NEW behavior is for find_package(Boost) to search for the upstream BoostConfig.cmake. +if (${CMAKE_VERSION} VERSION_GREATER "3.29") + cmake_policy(SET CMP0167 OLD) +endif() + if(NOT DEFINED PSP_CMAKE_MODULE_PATH) set(PSP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake") endif()