From 0849eb801ee5039798ecb52fe1e3f0e532fa33b5 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 13 Apr 2026 21:50:24 +0200 Subject: [PATCH] Decouple `-Werror` from `MORE_WARNINGS` --- CMakeLists.txt | 2 +- CMakePresets.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2e4c5e0..62702d3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,7 +153,7 @@ else() -Wno-gnu-zero-variadic-macro-arguments) if(MORE_WARNINGS) - add_compile_options(-Werror -Wextra + add_compile_options(-Wextra -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wlogical-op -Wnull-dereference -Wold-style-cast -Wshift-overflow=2 -Wstringop-overflow=4 -Wtrampolines -Wundef -Wuninitialized -Wunused -Wshadow diff --git a/CMakePresets.json b/CMakePresets.json index 255c4db7..74b4d18f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,6 +7,8 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "CMAKE_EXPORT_COMPILE_COMMANDS": true, + "CMAKE_COMPILE_WARNING_AS_ERROR": true, + "CMAKE_LINK_WARNING_AS_ERROR": true, "MORE_WARNINGS": true, "SANITIZERS": true },