This is required for conditional compilation in the C++ code depending on whether Chronik is enabled.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC68ac3d500882: [Chronik] Add `ENABLE_CHRONIK` #define macro
- cmake with -DBUILD_BITCOIN_CHRONIK=ON generates #define ENABLE_CHRONIK 1 in build/src/config/bitcoin-config.h
- cmake with -DBUILD_BITCOIN_CHRONIK=OFF generates #define ENABLE_CHRONIK 0 in build/src/config/bitcoin-config.h
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
You are missing the option(BUILD_BITCOIN_CHRONIK) statement.
Also please expand on the test plan to check the option creates the expected defines when set.
src/config/bitcoin-config.h.cmake.in | ||
---|---|---|
76 ↗ | (On Diff #34523) | That's a weird location for this define. Either move it in it's own place with a short comment or at least keep the lexical ordering. |
Comment Actions
Fix: Use #cmakedefine01 to define the macro. This is the expected behavior (define ENABLE_CHRONIK as either 1 or 0) and
meshes better with #if.