[NFC] cmake: do not suppress -Wunused-but-set-variable globally (#1723)

Only disable `-Wunused-but-set-variable` for tests that do not compile
cleanly with this warning enabled.  This re-enables the warning for
most other tests, so that it can catch any new occurrences.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2023-05-16 09:58:04 +01:00
committed by GitHub
parent 06c0c99c2e
commit 1884042f5d
9 changed files with 15 additions and 2 deletions

View File

@@ -105,7 +105,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang"
add_cxx_flag_if_supported(-Wall)
# Suppress warnings that currently trigger on the code base.
# This list should shrink over time when warnings are fixed.
add_cxx_flag_if_supported(-Wno-unused-but-set-variable)
add_cxx_flag_if_supported(-Wno-sometimes-uninitialized)
add_cxx_flag_if_supported(-Wno-sign-compare)
endif()