From 2007d0e4a0ad730415567df47fd700c63e2ac0ed Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 2 May 2023 01:57:22 -0400 Subject: CMakeLists: Enable checks on Clang Enables shadow-uncaptured-locals and implicit-fallthrough for Clang. implicit-fallthrough is not enabled by default in -Wall or -Wextra, and shadow-uncaptured-local doesn't seem to be enabled by default by -Wshadow, even though GCC has both of these by their respective cases. --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 312a49f42..48ddbef9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -113,6 +113,8 @@ else() $<$:-Wno-braced-scalar-init> $<$:-Wno-unused-private-field> + $<$:-Werror=shadow-uncaptured-local> + $<$:-Werror=implicit-fallthrough> $<$:-Wno-braced-scalar-init> $<$:-Wno-unused-private-field> ) -- cgit v1.2.3 From f7292c776bb851b5d85e83c057890ad5186e3cff Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 2 May 2023 02:07:36 -0400 Subject: CMake: Enable type limits on Clang --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 48ddbef9d..5e3a74c0f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -115,6 +115,7 @@ else() $<$:-Wno-unused-private-field> $<$:-Werror=shadow-uncaptured-local> $<$:-Werror=implicit-fallthrough> + $<$:-Werror=type-limits> $<$:-Wno-braced-scalar-init> $<$:-Wno-unused-private-field> ) -- cgit v1.2.3