From e28bd7f619feca38aa55573d0d88aff23824f39d Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 1 Sep 2015 14:00:51 -0500 Subject: [PATCH] CMake: Silence warnings on Mac with XCode prior to 6.3 --- cmake/setup_compiler_flags_gnu.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index d375017db7..9409c36cc8 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -97,11 +97,18 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-variadic-macros") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c++11-extensions") - IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.6") - # - # Clang versions prior to 3.6 emit a lot of false positives wrt - # "-Wunused-function". - # + # + # Clang versions prior to 3.6 emit a lot of false positives wrt + # "-Wunused-function". Also suppress warnings for Xcode older than 6.3 + # (which is equivalent to clang < 3.6). + # + # FIXME: I wait for the day with a clang version "4.0"... and I will + # curse the person that thought it is a _great_ idea to come up with + # independent version numbers for clang on Mac... + # + IF( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.6" OR + ( NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0" AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.3") ) ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-function") ENDIF() ENDIF() -- 2.39.5