From 2d042d8e1b91807d34d08168fdcf417c2f7cb685 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 5 Nov 2023 16:31:46 +0100 Subject: [PATCH] Try to activate -Wundef on all builds --- tools/cmake/Flags.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index b058f8ef53..5ec57539b0 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -77,11 +77,9 @@ if(enable_compile_warnings AND enable_debug) endif() # Activate the warnings on #if FOOBAR when FOOBAR has no value -# It breaks on FreeBSD within Boost headers, so activate this only in Pure Hardcore debug mode. - if(enable_maintainer_mode) - set(warnCFLAGS "${warnCFLAGS} -Wundef") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") -endif() +# It used to break on FreeBSD within Boost headers and was only activated in maintainer mode, but I hope it works nowadays +set(warnCFLAGS "${warnCFLAGS} -Wundef") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") # Set the optimisation flags # NOTE, we should CMAKE_BUILD_TYPE for this -- 2.20.1