From 75edf2a8811da5ac379c9dc994d371f31bb74b6e Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 20 Sep 2022 16:55:51 +0100 Subject: [PATCH] [NFC] Enable -Wall for math_brute_force (#1477) math_brute_force compiles cleanly with `-Wall` currently, so avoid regressing from that state. Ideally we would enable `-Wall` in the top-level CMakeLists.txt, but other tests do not compile cleanly with `-Wall` yet. Signed-off-by: Sven van Haastregt Signed-off-by: Sven van Haastregt --- test_conformance/math_brute_force/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test_conformance/math_brute_force/CMakeLists.txt b/test_conformance/math_brute_force/CMakeLists.txt index 28d2716f..23ee6849 100644 --- a/test_conformance/math_brute_force/CMakeLists.txt +++ b/test_conformance/math_brute_force/CMakeLists.txt @@ -40,4 +40,14 @@ set(${MODULE_NAME}_SOURCES utility.h ) +# math_brute_force compiles cleanly with -Wall but other tests not (yet), so +# enable -Wall locally. +if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang") + SET_SOURCE_FILES_PROPERTIES( + ${${MODULE_NAME}_SOURCES} + PROPERTIES + COMPILE_FLAGS "-Wall -Wno-format -Wno-strict-aliasing -Wno-unknown-pragmas" + ) +endif() + include(../CMakeCommon.txt)