From: maier Date: Wed, 3 Oct 2012 13:10:53 +0000 (+0000) Subject: Set pedantic only for gcc>=4.4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b615a4f4fa45e59844fa29d1d275d7c16aca16a;p=dealii-svn.git Set pedantic only for gcc>=4.4 git-svn-id: https://svn.dealii.org/branches/branch_cmake@26934 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 0d390947d9..a25b235ccc 100644 --- a/deal.II/cmake/setup_compiler_flags_gnu.cmake +++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake @@ -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: