From: Matthias Maier Date: Wed, 27 Mar 2013 11:13:39 +0000 (+0000) Subject: CMake: Enable -pedantic at the very beginning X-Git-Tag: v8.0.0~877 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d44b024e829b56ef35b9fd243ec5d632961d471;p=dealii.git CMake: Enable -pedantic at the very beginning git-svn-id: https://svn.dealii.org/trunk@29059 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 5604f0ac49..ae808667e3 100644 --- a/deal.II/cmake/setup_compiler_flags_gnu.cmake +++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake @@ -34,6 +34,14 @@ ENDIF() # # ######################## +# +# Set -pedantic if the compiler supports it. +# +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() + # # Enable all supported CPU instruction sets: # @@ -52,14 +60,6 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic") # ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") -# -# Set -pedantic if the compiler supports it. -# -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: