From 2e8dc92676adff107f5556466e54fb704c395ad8 Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 23 Jul 2013 09:13:42 +0000 Subject: [PATCH] CMake: Silence clang warnings about unused arguments git-svn-id: https://svn.dealii.org/trunk@30125 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_compiler_flags_gnu.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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") -- 2.39.5