]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Set up boost specific -Wno-* switches in configure_boost.cmake 805/head
authorMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Wed, 15 Apr 2015 16:13:48 +0000 (18:13 +0200)
committerMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Wed, 15 Apr 2015 17:03:48 +0000 (19:03 +0200)
cmake/configure/configure_boost.cmake
cmake/setup_compiler_flags_gnu.cmake

index 66c3092bf786fb7c5e35f1cdc15096e434d64ce5..7e68bde107a7d2bdd73bc5a6804eb30dffe8a9f0 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -22,8 +22,29 @@ SET(DEAL_II_WITH_BOOST ON # Always true. We need it :-]
   )
 
 
-MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
+MACRO(SET_UP_BOOST_FLAGS)
+  #
+  # Newer versions of gcc have a flag -Wunused-local-typedefs that, though in
+  # principle a good idea, triggers a lot in BOOST in various places.
+  # Unfortunately, this warning is included in -W/-Wall, so disable it if the
+  # compiler supports it.
+  #
+  ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs")
+
+  IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+    # not harmless but needed for boost <1.50.0
+    ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-delete-non-virtual-dtor")
+
+    # suppress warnings in boost 1.56:
+    ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-c++11-extensions")
+    ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-c99-extensions")
+    ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-parameter")
+    ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-variadic-macros")
+  ENDIF()
+ENDMACRO()
 
+
+MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
   #
   # Add rt to the link interface as well, boost/chrono needs it.
   #
@@ -33,10 +54,17 @@ MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
     SET(BOOST_LIBRARIES ${rt_LIBRARY})
   ENDIF()
 
+  SET_UP_BOOST_FLAGS()
+
   SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include)
 ENDMACRO()
 
 
+MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL)
+  SET_UP_BOOST_FLAGS()
+ENDMACRO()
+
+
 CONFIGURE_FEATURE(BOOST)
 
 
index a46aa0e3a4ea59982608757f57af933cd8499e31..850250b8e3527aad4814edccbfec45f2bf52d852 100644 (file)
@@ -65,14 +65,6 @@ ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsynth")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wsign-compare")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wswitch")
 
-#
-# Newer versions of gcc have a flag -Wunused-local-typedefs that, though in
-# principle a good idea, triggers a lot in BOOST in various places.
-# Unfortunately, this warning is included in -W/-Wall, so disable it if the
-# compiler supports it.
-#
-ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-local-typedefs")
-
 #
 # Disable Wlong-long that will trigger a lot of warnings when compiling
 # with disabled C++11 support:
@@ -100,19 +92,12 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   # easily fix them...)
   #
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-dangling-else")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-newline-eof")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-function")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-parameter") # mainly caused by BOOST
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-private-field")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-variable")
-
-  # suppress warnings in boost 1.56:
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c++11-extensions")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c99-extensions")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-variadic-macros")
 ENDIF()
 
 

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.