The FindBoost
module has been removed by policy CMP0167.
Based on #32665.
This has a few advantages over the old method of simply copying headers:
- Installs proper cmake files which can be picked up by our buildsystem
- Only installs necessary headers, not all of boost
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32667.
See the guideline for information on the review process. A summary of reviews will appear here.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
16@@ -17,17 +17,8 @@ function(add_boost_if_needed)
17 directory and other added INTERFACE properties.
18 ]=]
19
20- # We cannot rely on find_package(Boost ...) to work properly without
21- # Boost_NO_BOOST_CMAKE set until we require a more recent Boost because
22- # upstream did not ship proper CMake files until 1.82.0.
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.
We still support Boost 1.73
+, and older verisons of CMake. Why is this ok to remove now?
IIRC, this comment was about “proper CMake files” shipped with source archives.
For example, Ubuntu 22.04 ships Boost 1.74 with package configuration files:
0/usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake
1/usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfigVersion.cmake
2/usr/lib/x86_64-linux-gnu/cmake/BoostDetectToolset-1.74.0.cmake
3/usr/lib/x86_64-linux-gnu/cmake/boost_headers-1.74.0/boost_headers-config-version.cmake
4/usr/lib/x86_64-linux-gnu/cmake/boost_headers-1.74.0/boost_headers-config.cmake
https://github.com/bitcoin/bitcoin/actions/runs/15402950316/job/43339643754?pr=32667#step:8:1505:
0-- Looking for C++ include boost/test/included/unit_test.hpp
1-- Looking for C++ include boost/test/included/unit_test.hpp - not found
2CMake Error at cmake/module/AddBoostIfNeeded.cmake:65 (message):
3 Building test_bitcoin executable requested but
4 boost/test/included/unit_test.hpp header not available.
5Call Stack (most recent call first):
6 CMakeLists.txt:413 (add_boost_if_needed)
7
8
9-- Configuring incomplete, errors occurred!
The `FindBoost` module has been removed by policy CMP0167.
Labels
Build system