From 866fed0b7668ebfcc9ea9a2a854c2334f9b16a30 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 27 Mar 2013 11:13:39 +0000 Subject: [PATCH] CMake: Enable -pedantic at the very beginning git-svn-id: https://svn.dealii.org/trunk@29059 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_compiler_flags_gnu.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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: -- 2.39.5