From c0ba98bb5908c9742d991debd027ef7f6be318b2 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 11 Jun 2026 00:20:47 +0000 Subject: [PATCH] oki --- CMakeLists.txt | 2 +- docs/Options.md | 2 +- src/CMakeLists.txt | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd905d7f6..1fad46e41b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ set(YUZU_QT_MIRROR "" CACHE STRING "What mirror to use for downloading the bundl cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF) option(ENABLE_DEBUG_TOOLS "Enable debugging tools (maxwell disassembler, SPIRV translator, etc)" OFF) -option(ENABLE_WERROR "Enable -Werror diagnostics" OFF) +option(ENABLE_WERROR "Enable -Werror diagnostics" ON) # non-linux bundled qt are static if (YUZU_USE_BUNDLED_QT AND (APPLE OR NOT UNIX)) diff --git a/docs/Options.md b/docs/Options.md index 73a998a032..a8552f2f0f 100644 --- a/docs/Options.md +++ b/docs/Options.md @@ -47,7 +47,7 @@ These options control dependencies. - Needed for gyroscopes - Only available on Linux - `ENABLE_DEBUG_TOOLS` (OFF) Enables debugging and development tools, see [tools](../tools/README.md). -- `ENABLE_WERROR` (OFF) Enables warnings as errors (-Werror). +- `ENABLE_WERROR` (ON) Enables warnings as errors (-Werror). ### Flavors diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cd9b1e93c9..29fa24383a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -156,14 +156,21 @@ else() endif() if (ENABLE_WERROR) - add_compile_options($<$:-Werror>) + add_compile_options( + $<$:-Werror=all> + $<$:-Werror=extra> + $<$:-Werror=missing-declarations> + $<$:-Werror=shadow> + $<$:-Werror=unused>) + else() + add_compile_options( + $<$:-Wall> + $<$:-Wextra> + $<$:-Wmissing-declarations> + $<$:-Wshadow> + $<$:-Wunused>) endif() add_compile_options( - $<$:-Wall> - $<$:-Wextra> - $<$:-Wmissing-declarations> - $<$:-Wshadow> - $<$:-Wunused> $<$:-Wno-attributes> $<$:-Wno-invalid-offsetof> $<$:-Wno-unused-parameter>