Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FUTURE] cmake: Switch from tri-state options to ON/OFF #83

Closed
wants to merge 56 commits into from

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Jan 25, 2024

This PR is a continuation of the today's (2024-01-25) discussion on the meeting.

It is supposed to be a place for the further discussion and making a decision regarding the default option values.


The cmake-adjusted branch is to be always synced with the cmake-staging one.

hebasto and others added 30 commits January 26, 2024 20:45
Also add a sanity check for non-encapsulated (directory-wide) build
properties.
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
To configure CMake for cross-compiling, use
`--toolchain depends/${HOST}/share/toolchain.cmake` command-line option.
@hebasto hebasto changed the title cmake: Switch from tri-state options to ON/OFF [FUTURE] cmake: Switch from tri-state options to ON/OFF Jan 27, 2024
Make build options explicit.
The tri-state options were provided for the only purpose to check the
feature parity with the Autotools-based build system.

Also a new "dev-mode" configure preset suggested.
expected: 'pass'

# SQLite: Using CMake's FindSQLite3 module.
- system_packages: 'libboost-dev libevent-dev'
depends_options: 'NO_BDB=1 NO_SQLITE=1 NO_USDT=1'
build_options: '-DWITH_SQLITE=ON'
build_options: '-DENABLE_WALLET=ON -DWITH_SQLITE=ON'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't WITH_SQLITE=ON imply ENABLE_WALLET? What (extra) does ENABLE_WALLET do here? I'm not sure we'll actually want to keep it as an option.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked in #164.

@hebasto
Copy link
Owner Author

hebasto commented Apr 21, 2024

See #161 as a stage one of switching away from tri-state options.

hebasto added a commit that referenced this pull request Apr 22, 2024
df4e46b cmake [KILL 3-STATE]: Switch `MULTIPROCESS` to boolean w/ default OFF (Hennadii Stepanov)
732b4e9 cmake [KILL 3-STATE]: Switch `WITH_ZMQ` to boolean w/ default OFF (Hennadii Stepanov)
5bfecf4 cmake [KILL 3-STATE]: Switch `WITH_MINIUPNPC` to boolean w/ default OFF (Hennadii Stepanov)
a4d6a0c cmake [KILL 3-STATE]: Switch `WITH_NATPMP` to boolean w/ default OFF (Hennadii Stepanov)
dc20cdf fixup! build: Generate `share/toolchain.cmake` in depends (Hennadii Stepanov)
63bbe26 cmake: Add CI-specific presets (Hennadii Stepanov)

Pull request description:

  This PR partially pulled from #83 with options, which default values seem non-controversial.

  As a bonus, the help string duplication in `depends/toolchain.cmake.in` has been eliminated for the touched lines.

  The  [**Autotools vs CMake Feature Parity Table**](https://gist.github.com/hebasto/2ef97d3a726bfce08ded9df07f7dab5e) has been updated as well.

ACKs for top commit:
  vasild:
    ACK df4e46b

Tree-SHA512: c1079b929944b0f7ca60436c12ee655c4235ada03ebace25d091ef0b938e3beb2f48beea529b7205cd8ecec9d7377e6b6d9e0368c8902dd6e06303cacbc4747f
@hebasto
Copy link
Owner Author

hebasto commented Apr 27, 2024

@hebasto hebasto closed this Apr 27, 2024
hebasto added a commit that referenced this pull request May 4, 2024
2b4ad50 cmake [KILL 3-STATE]: Switch `WITH_{SQLITE,BDB}` to boolean (Hennadii Stepanov)

Pull request description:

  This PR is a continuation of #161 and #162 and tackles with the `WITH_SQLITE` and `WITH_BDB` options.

  For the latter the default value `OFF` is suggested.

  The #83 (comment):
  > Shouldn't `WITH_SQLITE=ON` imply `ENABLE_WALLET`? What (extra) does `ENABLE_WALLET` do here? I'm not sure we'll actually want to keep it as an option.

  has been addressed.

ACKs for top commit:
  TheCharlatan:
    ACK 2b4ad50

Tree-SHA512: 13d5bd16709ab557ee736696fe1d5d3fe64bae8cb77c000401c26b8be2deab0473474f7fa9bb958884ba3ab9c4d0b66e44766ca5c1c86d0fab3957642ec996b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants