]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only enable 'unused' GCC warnings in debug mode.
authorDavid Wells <drwells@vt.edu>
Sat, 4 Apr 2015 16:11:53 +0000 (12:11 -0400)
committerMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Tue, 14 Apr 2015 10:50:18 +0000 (12:50 +0200)
In debug mode all parameters and variables *should* be used (i.e., the
Assert macro is expanded).

cmake/setup_compiler_flags_gnu.cmake

index 8484a4fa03a02f12874588c5468ddf685569d2ed..1505625edcf39af1690a13de150fa7507fc4f834 100644 (file)
@@ -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()
-

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.