From: maier Date: Tue, 23 Jul 2013 09:13:42 +0000 (+0000) Subject: CMake: Silence clang warnings about unused arguments X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e8dc92676adff107f5556466e54fb704c395ad8;p=dealii-svn.git CMake: Silence clang warnings about unused arguments git-svn-id: https://svn.dealii.org/trunk@30125 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/setup_compiler_flags_gnu.cmake b/deal.II/cmake/setup_compiler_flags_gnu.cmake index 68132223e4..63bf98e31a 100644 --- a/deal.II/cmake/setup_compiler_flags_gnu.cmake +++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake @@ -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")