From ec27a2581dee894ab9ee23e221ac1b216a74d5d1 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 4 Apr 2015 12:11:53 -0400 Subject: [PATCH] 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). --- cmake/setup_compiler_flags_gnu.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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() - -- 2.39.5