build: Find Boost in config mode #32667

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:250602-boost-config changing 3 files +166 −30
  1. hebasto commented at 9:14 pm on June 2, 2025: member

    The FindBoost module has been removed by policy CMP0167.

    Based on #32665.

  2. depends: Bump boost to 1.88.0 and use new CMake buildsystem
    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>
    3a350c8a1b
  3. hebasto added the label Build system on Jun 2, 2025
  4. DrahtBot commented at 9:14 pm on June 2, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32667.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32595 (build: add a depends dependency provider by willcl-ark)

    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.

  5. in cmake/module/AddBoostIfNeeded.cmake:22 in 9cf00ebe4b outdated
    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.
    


    fanquake commented at 9:27 pm on June 2, 2025:

    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?


    hebasto commented at 10:43 pm on June 2, 2025:

    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
    
  6. fanquake commented at 7:13 am on June 3, 2025: member

    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!
    
  7. build: Find Boost in config mode
    The `FindBoost` module has been removed by policy CMP0167.
    cebb1a2f1d
  8. hebasto force-pushed on Jun 3, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-15 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me