From: maier Date: Wed, 27 Mar 2013 11:13:39 +0000 (+0000) Subject: CMake: Enable -pedantic at the very beginning X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=866fed0b7668ebfcc9ea9a2a854c2334f9b16a30;p=dealii-svn.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: