From 231dd04b8dcb85ed1bc9191b839fb6cd64acea86 Mon Sep 17 00:00:00 2001 From: will Date: Tue, 17 Feb 2026 12:26:01 +0000 Subject: [PATCH] build: define CMAKE_COMPILE_WARNING_AS_ERROR as a cache option CMAKE_COMPILE_WARNING_AS_ERROR is not a cache variable by default in CMake, so it has no value in the configure summary when not set, and even when set cannot be toggled in ccmake. Define it as an option() to make it a cache BOOL with a default of OFF. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f992a8d6af4..033ae81ffc3 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)