-
Notifications
You must be signed in to change notification settings - Fork 5
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
cmake: Consistent build option naming #198
Conversation
I've implemented all @ryanofsky's siggestions from his #194 (comment). However, I still have a few minor concerns.
The ccache tool shouldn't be considered as a dependency that affects the resulted binaries.
This option does not enable any features in the resulted binaries. It just forcibly enables |
I think most consistent approach is to make
I assumed FUZZ option controlled what compile options libraries were built with, so they would be instrumented for fuzzing. But if FUZZ only affects which targets are built, not how targets are built, it might make sense to use the More generally, it seems ok to use (I also think ideally, the |
Shouldn't multiprocess be an |
I also think the distinction in the output is a bit inconsistent / confusing. Drawing a distinction between |
This competes with @ryanofsky's suggestion in #194 (comment). What criteria we should consider to make a choice?
Would it be better to hide potential binaries from output when they are disabled? |
Does this look better:
? |
Agree it is nicer to have feature summary list all features together, and not split them up based on which features require external dependencies. Also the BUILD_MULTIPROCESS name I suggested was wrong, and I think it should be called WITH_LIBMULTIPROCESS, because it determines whether to call Lines 158 to 161 in 4ba2d95
(The reason I suggested BUILD_ instead of ENABLE_, was because I was still thinking about the autoconf build where there's a separate --with-libmultiprocess option to control detection of the library, and an --enable-multiprocess option to build the extra binaries. But in a cmake world without yes/no/auto logic, it is better to have one option than two.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 4ba2d95
Done.
Done. The PR description has been updated with a new screenshot and a summary excerpt. |
Both @TheCharlatan's comments have been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
https://gist.github.com/hebasto/2ef97d3a726bfce08ded9df07f7dab5e has been updated according to this PR changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 79c3c89
Tested on terminal and built multiprocess
on Ubuntu running successfully bitcoin-node
.
make -C depends -j $(nproc) HOST=x86_64-pc-linux-gnu CC="" CXX="" MULTIPROCESS=1 LOG=1
...
cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake
...
Configure summary
=================
Executables:
bitcoind ............................ ON
bitcoin-node (multiprocess) ......... OFF
bitcoin-qt (GUI) .................... OFF
bitcoin-gui (GUI, multiprocess) ..... OFF
bitcoin-cli ......................... ON
bitcoin-tx .......................... ON
bitcoin-util ........................ ON
bitcoin-wallet ...................... ON
bitcoin-chainstate (experimental) ... OFF
libbitcoinkernel (experimental) ..... OFF
Optional features:
wallet support ...................... ON
- descriptor wallets (SQLite) ...... ON
- legacy wallets (Berkeley DB) ..... OFF
external signer ..................... ON
port mapping:
- using NAT-PMP .................... OFF
- using UPnP ....................... OFF
ZeroMQ .............................. OFF
USDT tracing ........................ OFF
QR code (GUI) ....................... OFF
DBus (GUI, Linux only) .............. OFF
Tests:
test_bitcoin ........................ ON
test_bitcoin-qt ..................... OFF
bench_bitcoin ....................... ON
fuzz binary ......................... ON
...
[ 62%] Built target bitcoin_node
...
./build/src/bitcoin-node
2024-05-22T14:02:41Z Bitcoin Core version v27.99.0-79c3c897bb28 (release build)
...
nit: we don't want to indicate *multiprocess
is also experimental (?).
...
Configure summary
=================
Executables:
bitcoind ............................ ON
bitcoin-node (*multiprocess) ........ OFF
bitcoin-qt (GUI) .................... OFF
bitcoin-gui (GUI, *multiprocess) .... OFF
bitcoin-cli ......................... ON
bitcoin-tx .......................... ON
bitcoin-util ........................ ON
bitcoin-wallet ...................... ON
bitcoin-chainstate (experimental) ... OFF
libbitcoinkernel (experimental) ..... OFF
*multiprocess (experimental)
Optional features:
...
The "multiprocess" project is a WIP -- bitcoin#28722. |
97f4a60 fixup! cmake: Rename build option `FUZZ` to `ENABLE_FUZZ` (Hennadii Stepanov) Pull request description: This is a follow-up to #198. Rename missed cases. Top commit has no ACKs. Tree-SHA512: d2dab7cf45c8328b6658e9be60e739f736258af017a41039d19bd32443a01eac9423873ac6372eb85c77d8f1c32203020a6031aff62e8e6b1d83b2b97c938c65
Based on #194 (comment).
The build option naming convention
BUILD_*
options control what binaries and libraries are built.ENABLE_*
options control what features are turned on.If a feature is fully implemented in a standalone binary, a
BUILD_*
option should be used. For example,BUILD_GUI
.WITH_*
options control what dependencies are turned on (internally, a CMake commandfind_*
is used).The resulted build option set being presented in the CMake GUI tool looks as follows:
An example of the configure summary:
Closes #194.