From 78e5d7976ed14c27534f3a4a5a2812b2f7765c0f Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Mon, 19 Feb 2024 18:46:46 -0500 Subject: [PATCH] cmake: Enable implicit fallthrough warnings for gcc and clang --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61edc7b6..1f1680cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ else() endif() if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") - add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs + add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs -Wimplicit-fallthrough -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions) if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti) @@ -158,7 +158,7 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") endif() endif() elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) - add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs + add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs -Wimplicit-fallthrough -Wunused-parameter -Wunused-value -Wunused-variable) if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti)