From: Matthias Maier Date: Wed, 8 Jun 2022 02:57:00 +0000 (-0500) Subject: CMake: refactor boost define into config.h.in X-Git-Tag: v9.4.0-rc1~53^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f3a9d3206d380ad0f13ca03fba2f4e652872ed7;p=dealii.git CMake: refactor boost define into config.h.in In order to work around the newest set of deprecated header warnings (this time triggered by CGAL including a deprecated header :-(() I would otherwise have to add this #define dance at 5 different other places. Instead, it is cleaner to simply give up and define the macro globally. The configure checks will ensure that the macro is only ever defined if needed. --- diff --git a/include/deal.II/base/bounding_box_data_out.h b/include/deal.II/base/bounding_box_data_out.h index f79fb6072f..b9aa2a443a 100644 --- a/include/deal.II/base/bounding_box_data_out.h +++ b/include/deal.II/base/bounding_box_data_out.h @@ -28,14 +28,8 @@ #include DEAL_II_DISABLE_EXTRA_DIAGNOSTICS -#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS -# define BOOST_ALLOW_DEPRECATED_HEADERS -#endif #include #include -#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS -# undef BOOST_ALLOW_DEPRECATED_HEADERS -#endif DEAL_II_ENABLE_EXTRA_DIAGNOSTICS diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 706fb4a28b..07b3da84af 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -233,6 +233,10 @@ /* cmake/configure/configure_2_boost.cmake */ #cmakedefine DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS +#ifdef defined(DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS) && \ + !defined(BOOST_ALLOW_DEPRECATED_HEADERS) +# define BOOST_ALLOW_DEPRECATED_HEADERS +#endif /* cmake/configure/configure_2_trilinos.cmake */ #cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD diff --git a/include/deal.II/numerics/rtree.h b/include/deal.II/numerics/rtree.h index f23cc7e6a2..3ebade3fde 100644 --- a/include/deal.II/numerics/rtree.h +++ b/include/deal.II/numerics/rtree.h @@ -27,15 +27,8 @@ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include - -#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS -# define BOOST_ALLOW_DEPRECATED_HEADERS -#endif #include #include -#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS -# undef BOOST_ALLOW_DEPRECATED_HEADERS -#endif DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #include