CMake-based build system tracking issue #28607

issue hebasto openend this issue on October 6, 2023
  1. hebasto commented at 10:55 am on October 6, 2023: member

    This issue will be updated to reflect the current state of CMake integration.

    A brief historical context:

    1. #25797 proposed a CMake-based build system with 100% feature parity to the Autotools-based one.
    2. The reviewing process is happening in this repo as suggested in #27060 (comment).
    3. The recent discussion at CoreDev – https://btctranscripts.com/bitcoin-core-dev-tech/2023-09/cmake/

    How reviewing happens:

    1. Pull requests are opened against the https://github.com/hebasto/bitcoin/tree/cmake-staging branch.
    2. After reviewing and merging them, the staging branch get synced with the main branch from this repo.
    3. This loop continues until all commits from #25797 get reviewed.

    The planned chunks of work:


    ~The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.~


    To hold the 100% feature parity, the current CMake-based build system implementation can autodetect an optional package and enable it as Autotools-based one does. However, it was suggested to make all optional package opt-in by default. See:


    Autotools vs CMake Feature Parity Table is available here.

    To list CMake’s options, one might add the -LH option during configuring step.


    Updated build docs:

  2. hebasto commented at 10:59 am on October 6, 2023: member
  3. maflcko commented at 11:23 am on October 6, 2023: member

    The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.

    Buster Backports has 3.18: https://packages.debian.org/buster-backports/cmake

  4. maflcko commented at 11:26 am on October 6, 2023: member
    Also, on a general note, it would be good to have a “cheat sheet” table for each configure option to list the corresponding cmake option. Maybe also one auto-generated and enforced with a script, to check equality, similar to https://github.com/curl/curl/pull/11964
  5. hebasto commented at 12:00 pm on October 6, 2023: member

    Also, on a general note, it would be good to have a “cheat sheet” table for each configure option to list the corresponding cmake option. Maybe also one auto-generated and enforced with a script, to check equality, similar to curl/curl#11964

    Thanks! It is available here. It has been added to the top post.

  6. hebasto commented at 10:20 pm on October 17, 2023: member
    The next PR to review is https://github.com/hebasto/bitcoin/pull/32.
  7. hebasto commented at 0:06 am on October 18, 2023: member

    The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.

    Buster Backports has 3.18: packages.debian.org/buster-backports/cmake

    The CMake minimum required version has been bumped up to 3.16 in https://github.com/hebasto/bitcoin/pull/33.

  8. ajtowns commented at 12:11 pm on October 30, 2023: contributor
    libbitcoin-kernel and bitcoin-chainstate should be on this list too?
  9. hebasto commented at 12:56 pm on October 30, 2023: member

    libbitcoin-kernel and bitcoin-chainstate should be on this list too?

    Sure. Added.

  10. hebasto commented at 10:10 am on November 29, 2023: member
    The new Building Bitcoin Core with Visual Studio doc has been added to the issue description.
  11. paulocoutinhox commented at 9:25 am on December 13, 2023: none
    +1
  12. hebasto commented at 3:07 pm on January 8, 2024: member

    Heads up: here are suggestions regarding the current features that are not expected being ported to the CMake-based build system:

  13. fanquake referenced this in commit b3b19be20d on Jan 9, 2024
  14. hebasto commented at 5:32 pm on March 9, 2024: member
  15. Sjors commented at 10:27 am on April 22, 2024: member

    What’s next?

    It would be useful to have a link to build instructions too, not just the cheat cheat (or just add the standard mkdir build, cmake .. incantations to the cheat cheat).

    In noticed that in your hebasto/cmake-staging branch the macOS instructions still assume autotools.

  16. hebasto commented at 10:46 am on April 22, 2024: member

    @Sjors

    What’s next?

    It would be useful to have a link to build instructions too, not just the cheat cheat (or just add the standard mkdir build, cmake .. incantations to the cheat cheat).

    In noticed that in your hebasto/cmake-staging branch the macOS instructions still assume autotools.

    WIP :)

    Your testing and reviewing https://github.com/hebasto/bitcoin/pull/163 will be much appreciated!

  17. hebasto commented at 11:12 pm on May 20, 2024: member

    The main part of the #28607#issue-1929913410 has all checkboxes checked.

    Thanks to all reviewers and testers!

    Keeping working :)

  18. hebasto commented at 7:58 am on October 15, 2024: member
    Closing. See #30454.
  19. hebasto closed this on Oct 15, 2024


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: 2024-11-21 18:12 UTC

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