Skip to content

Commit

Permalink
Merge #259: cmake: Silent "Policy CMP0167 is not set"
Browse files Browse the repository at this point in the history
b3448f1 fixup! cmake: Build `bitcoind` executable (Hennadii Stepanov)

Pull request description:

  This PR silents a developer warning when using >=CMake 3.30.

  Closes #257.

ACKs for top commit:
  theuni:
    ACK b3448f1

Tree-SHA512: 6a11db220df55ef44ce7121ca1751a918686394ea76c440457d1d87f359c48bccfae807045975f520805a39bae40d9e85d088e627edf54047793d5c0e741e29e
  • Loading branch information
hebasto committed Jul 16, 2024
2 parents d3b57c3 + b3448f1 commit 1732a6b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/module/AddBoostIfNeeded.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ function(add_boost_if_needed)
directory and other added INTERFACE properties.
]=]

# We cannot rely on find_package(Boost ...) to work properly without
# Boost_NO_BOOST_CMAKE set until we require a more recent Boost because
# upstream did not ship proper CMake files until 1.82.0.
# Until then, we rely on CMake's FindBoost module.
# See: https://cmake.org/cmake/help/latest/policy/CMP0167.html
if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost 1.73.0 REQUIRED)
mark_as_advanced(Boost_INCLUDE_DIR)
Expand Down

0 comments on commit 1732a6b

Please sign in to comment.