]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Set pedantic only for gcc>=4.4
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Oct 2012 13:10:53 +0000 (13:10 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Oct 2012 13:10:53 +0000 (13:10 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26934 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_compiler_flags_gnu.cmake

index 0d390947d91b92bab6a5de87c145f1a65bd53d65..a25b235cccd831ae5ed3ebe85913b421bc468de4 100644 (file)
@@ -19,7 +19,8 @@
 # editing this file.
 #
 
-IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4" )
+IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
+    CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4" )
   MESSAGE(WARNING "\n"
     "You're using an old version of the GNU Compiler Collection (gcc/g++)!\n"
     "It is strongly recommended to use at least version 3.4.\n"
@@ -47,7 +48,10 @@ ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
 #
 # Set -pedantic if the compiler supports it.
 #
-ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-pedantic")
+IF(NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
+        CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.4"))
+  ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-pedantic")
+ENDIF()
 
 #
 # Setup various warnings:

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.