From: David Wells Date: Sat, 4 Apr 2015 16:11:53 +0000 (-0400) Subject: Only enable 'unused' GCC warnings in debug mode. X-Git-Tag: v8.3.0-rc1~278^2~9 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec27a2581dee894ab9ee23e221ac1b216a74d5d1;p=dealii.git Only enable 'unused' GCC warnings in debug mode. In debug mode all parameters and variables *should* be used (i.e., the Assert macro is expanded). --- diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index 8484a4fa03..1505625edc 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -58,6 +58,7 @@ ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed") # Setup various warnings: # ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wall") +ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wextra") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wpointer-arith") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wwrite-strings") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsynth") @@ -137,8 +138,6 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-all-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fstrict-aliasing") - - ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-Wno-unused") ENDIF() @@ -181,4 +180,3 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug") ENDIF() ENDIF() -