Skip to content

Commit

Permalink
fixup! cmake: Build bitcoind executable
Browse files Browse the repository at this point in the history
Silent "Policy CMP0167 is not set" warning and document usage of the
`Boost_NO_BOOST_CMAKE` variable.
  • Loading branch information
hebasto committed Jul 16, 2024
1 parent 9323ce2 commit b3448f1
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 b3448f1

Please sign in to comment.