cmake: Inherit WERROR setting for secp256k1 build #33297
pull jmoik wants to merge 1 commits into bitcoin:master from jmoik:cmake_inherit_Werror_secp256k1 changing 1 files +9 −0-
jmoik commented at 6:34 pm on September 3, 2025: noneThis change prevents unexpected CLI output when compiling with -DWERROR=ON (treat warnings as errors). This setting is now properly propagated to the secp256k1 subproject build. Previously, secp256k1 would be built without the -Werror flag even when the main project was configured to treat warnings as errors, creating inconsistent build behavior. https://github.com/bitcoin/bitcoin/issues/33284
-
cmake: Inherit WERROR setting for secp256k1 build ed1c975100
-
DrahtBot added the label Build system on Sep 3, 2025
-
DrahtBot commented at 6:34 pm on September 3, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33297.
Reviews
See the guideline for information on the review process.
Type Reviewers Concept NACK purpleKarrot If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
purpleKarrot commented at 9:25 am on September 4, 2025: contributor
I am going to NACK every PR that adds even more
-Werror
. 30f642952cb5bf39479bdbe467b3950f0d09324a was a mistake and should be reverted. The correct approach to this isCMAKE_COMPILE_WARNING_AS_ERROR
.Yes, that requires CMake 3.24 and we allow 3.22 as the minimum. It does not matter. Just accept that the setting will have no effect on Ubuntu 22.04. :man_shrugging:
cc @hebasto
-
hebasto commented at 11:27 am on September 4, 2025: member
30f6429 was a mistake…
Here is some historical context.
When migrating the build system from Autotools to CMake, there was a unanimous expectation that, at least initially, we should aim for 100% build option compatibility. That commit introduced CMake’s counterpart to Autotools’
--enable-werror
:https://github.com/bitcoin/bitcoin/blob/6e62b705328f4a52875a1dd3bfb63fbba8586a01/configure.ac#L284-L289 -
hebasto commented at 11:34 am on September 4, 2025: member
Yes, that requires CMake 3.24 and we allow 3.22 as the minimum. It does not matter. Just accept that the setting will have no effect on Ubuntu 22.04. 🤷♂️
That seems acceptable to me, as none of the CI jobs use CMake older that 3.24. And when someone sets
CMAKE_COMPILE_WARNING_AS_ERROR
with an older CMake, it issues a warning:0CMake Warning: 1 Manually-specified variables were not used by the project: 2 3 CMAKE_COMPILE_WARNING_AS_ERROR
-
purpleKarrot commented at 2:05 pm on September 4, 2025: contributor
Here is some historical context.
Don’t take it personal. You did a great job migrating from autotools to CMake. I have zero doubts about that.
jmoik
DrahtBot
purpleKarrot
hebasto
Labels
Build system
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: 2025-09-10 18:13 UTC
More mirrored repositories can be found on mirror.b10c.me