Skip to content

Commit 9878741

Browse files
committed
cmake: use upstream BoostConfig.cmake unconditionally
Fixes the following deprecation warning: ``` CMake Warning (dev) at src/CMakeLists.txt:38 (find_package): Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning. ```
1 parent ae5069b commit 9878741

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ if(SANITIZERS)
3535
endif()
3636

3737
# find Boost
38-
find_package(Boost REQUIRED
38+
set(Boost_VERBOSE TRUE)
39+
find_package(Boost CONFIG REQUIRED
3940
COMPONENTS filesystem
4041
program_options
4142
regex
@@ -126,7 +127,7 @@ macro(build_pycsdiff version)
126127

127128
# find boost_python${version}
128129
set(PYTHON_VERSION_SUFFIX "${version}${Python${version}_VERSION_MINOR}")
129-
find_package(Boost REQUIRED COMPONENTS python${PYTHON_VERSION_SUFFIX})
130+
find_package(Boost CONFIG REQUIRED COMPONENTS python${PYTHON_VERSION_SUFFIX})
130131
message(STATUS "Python ${version} binding enabled. "
131132
"The pycsdiff module will be built!")
132133

0 commit comments

Comments
 (0)