Skip to content

Commit dac7f44

Browse files
committed
Fix CMP0167 CMake warning
1 parent f677706 commit dac7f44

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ if(CMAKE_GENERATOR STREQUAL "Ninja")
2828
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
2929
endif()
3030

31-
find_package(Boost 1.70 COMPONENTS context REQUIRED)
31+
if(POLICY CMP0144)
32+
# Allow upper-case package ROOT variables
33+
cmake_policy(SET CMP0144 NEW)
34+
endif()
35+
36+
find_package(Boost 1.70 CONFIG COMPONENTS context REQUIRED)
3237

3338
include(FetchContent)
3439

cmake/simsycl-config.cmake.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ set(SIMSYCL_LIBRARY SimSYCL::simsycl)
1414
set(SIMSYCL_ORIGINAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
1515
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${SIMSYCL_CMAKE_DIR}")
1616

17-
find_dependency(Boost 1.70 COMPONENTS context REQUIRED)
17+
if(POLICY CMP0144)
18+
# Allow upper-case package ROOT variables
19+
cmake_policy(SET CMP0144 NEW)
20+
endif()
21+
22+
find_dependency(Boost 1.70 CONFIG COMPONENTS context REQUIRED)
1823
find_dependency(nlohmann_json)
1924
find_dependency(libenvpp)
2025

0 commit comments

Comments
 (0)