From 978aece939e001e679b37c87eb5aeee3e98838c6 Mon Sep 17 00:00:00 2001 From: Peter Thoman Date: Tue, 31 Dec 2024 21:18:11 +0100 Subject: [PATCH] Fix CMP0167 CMake warning --- CMakeLists.txt | 7 ++++++- cmake/simsycl-config.cmake.in | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c8df44..e6e46cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,12 @@ if(CMAKE_GENERATOR STREQUAL "Ninja") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") endif() -find_package(Boost 1.70 COMPONENTS context REQUIRED) +if(POLICY CMP0144) + # Allow upper-case package ROOT variables + cmake_policy(SET CMP0144 NEW) +endif() + +find_package(Boost 1.70 CONFIG COMPONENTS context REQUIRED) include(FetchContent) diff --git a/cmake/simsycl-config.cmake.in b/cmake/simsycl-config.cmake.in index c024a4f..8549b3a 100644 --- a/cmake/simsycl-config.cmake.in +++ b/cmake/simsycl-config.cmake.in @@ -14,7 +14,7 @@ set(SIMSYCL_LIBRARY SimSYCL::simsycl) set(SIMSYCL_ORIGINAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}") set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${SIMSYCL_CMAKE_DIR}") -find_dependency(Boost 1.70 COMPONENTS context REQUIRED) +find_dependency(Boost 1.70 CONFIG COMPONENTS context REQUIRED) find_dependency(nlohmann_json) find_dependency(libenvpp)