build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option
What changed, and why it matters
This is a minor build-system change. It makes a CMake setting called CMAKE_COMPILE_WARNING_AS_ERROR appear in the configuration summary and be toggleable in the ccmake tool. It does not change how Bitcoin Core is compiled, what warnings are treated as errors, or any runtime behavior. There is no security relevance.
No security action needed. This is a benign build-system usability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds one line to CMakeLists.txt declaring CMAKE_COMPILE_WARNING_AS_ERROR as an option() with default OFF. CMake’s option() creates a cache BOOL variable, which makes the setting visible in ccmake and in the configure summary. The default remains OFF, so compiler warnings are not treated as errors unless explicitly enabled. No compile flags, source code, or runtime logic are modified.
Changed components
CMakeLists.txt build configurationInspect captured patch +1 / −0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f992a8d6..033ae81f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,7 @@ endif()
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF)
+option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." OFF)
option(WITH_CCACHE "Attempt to use ccache for compiling." ON)
option(WITH_ZMQ "Enable ZMQ notifications." OFF)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.