From a57926ac573a026b2ecb9e79f2e4b5cefb0b54d1 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Mon, 16 Mar 2026 17:54:28 +0100 Subject: [PATCH] CMake: Explicitly demote -Wchanges-meaning diagnostics to warnings on GCC --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11ae02c0f..5a130df38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -446,6 +446,11 @@ if(ENUM_ENUM_WARNING) add_compile_options(-Wno-deprecated-enum-enum-conversion) endif() +# GCC enables -Wchanges-meaning by default and treats some cases as an error +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_compile_options(-Wno-error=changes-meaning) +endif() + if(ENABLE_WERROR OR ENABLE_STRICT_WERROR) add_compile_options(-Werror) if (NOT ENABLE_STRICT_WERROR)