]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Silence clang warnings about unused arguments
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Jul 2013 09:13:42 +0000 (09:13 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Jul 2013 09:13:42 +0000 (09:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@30125 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_compiler_flags_gnu.cmake

index 68132223e46cb88095f8668a9b10b3ff8227cbb9..63bf98e31a7f024c6096f90b16289caacb1c8761 100644 (file)
@@ -81,6 +81,11 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations")
 
 
 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+  #
+  # Silence Clang warnings about unused parameters:
+  #
+  SET(CMAKE_CXX_FLAGS "-Qunused-arguments ${CMAKE_CXX_FLAGS}")
+
   #
   # *Boy*, clang seems to be the very definition of "pedantic" in
   # "-pedantic" mode, so disable a bunch of harmless warnings
@@ -120,9 +125,7 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release")
   ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
 
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops")
-  IF(NOT(CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
-    ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-all-loops")
-  ENDIF()
+  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 "-felide-constructors")
 

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.