hebasto
commented at 3:15 pm on August 18, 2024:
member
When using a multi-config generator, such as “Ninja Multi-Config”, the build system still builds the tests binary for the “Coverage” configuration, which is meaningless:
0$ cmake -B build -G "Ninja Multi-Config"
1$ cmake --build build --config Coverage
2[18/19] Building C object src/CMakeFiles/tests.dir/Coverage/tests.c.o
3/home/hebasto/git/secp256k1/secp256k1/src/tests.c:18:13: note: ‘#pragma message: Defining VERIFY for tests being built for coverage analysis support is meaningless.’
4 18 | #pragma message("Defining VERIFY for tests being built for coverage analysis support is meaningless.")
5 | ^~~~~~~
6[19/19] Linking C executable src/Coverage/tests
real-or-random
commented at 2:55 pm on August 19, 2024:
contributor
@hebasto Can you summarize what this PR does and why is it preferable to #1291? The approach in #1291 seemed natural to me.
real-or-random added the label
assurance
on Aug 1, 2025
real-or-random added the label
build
on Aug 1, 2025
real-or-random removed the label
assurance
on Aug 1, 2025
hebasto renamed this:
cmake: Rework `tests` target for Coverage configuartion and multi-config generators
cmake: Rework `tests` target for Coverage configuration and multi-config generators
on Aug 10, 2025
cmake: Move `is_multi_config` to unconditional flow
This change ensures the correct evaluation of `is_multi_config` when
printing the configure summary.
d2bd95fd7e
cmake: Do not hard-code `CMAKE_CONFIGURATION_TYPES`
The initial idea was to place the desired default build configuration
first in `CMAKE_CONFIGURATION_TYPES`. The "Ninja Multi-Config" generator
treats the first configuration as the default, but this is not the case
for other generators.
This change uses the dedicated `CMAKE_DEFAULT_BUILD_TYPE` variable for
the same purpose, avoiding hard-coding `CMAKE_CONFIGURATION_TYPES` and
preserving users' settings, if any.
8923d470f2
cmake: Allow user to override "Coverage" build type flags78ef6a73f9
cmake: Explicitly specify generators that support Coverage functionality
Only the "Ninja Multi-Config" generator supports an `EXCLUDE_FROM_ALL`
target property value that varies by configuration.
b2119a790f
cmake: Rework `tests` target for Coverage and multi-config generators7d5a19ca88
hebasto force-pushed
on Aug 10, 2025
hebasto marked this as ready for review
on Aug 10, 2025
hebasto
commented at 5:49 pm on August 10, 2025:
member
Rebased and reworked.
The following is an example workflow on Ubuntu 24.04:
This is a metadata mirror of the GitHub repository
bitcoin-core/secp256k1.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2025-08-30 22:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me