From 5f3a9d3206d380ad0f13ca03fba2f4e652872ed7 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 7 Jun 2022 21:57:00 -0500 Subject: [PATCH] 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. --- include/deal.II/base/bounding_box_data_out.h | 6 ------ include/deal.II/base/config.h.in | 4 ++++ include/deal.II/numerics/rtree.h | 7 ------- 3 files changed, 4 insertions(+), 13 deletions(-) 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 -- 2.39.5