]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Silence warnings on Mac with XCode prior to 6.3 1505/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 1 Sep 2015 19:00:51 +0000 (14:00 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 1 Sep 2015 19:00:51 +0000 (14:00 -0500)
cmake/setup_compiler_flags_gnu.cmake

index d375017db728d27d602765f376dd60d2c86a3d8d..9409c36cc819c9c081acaba7480f46ea65955b38 100644 (file)
@@ -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()

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.