]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: refactor boost define into config.h.in
authorMatthias Maier <tamiko@43-1.org>
Wed, 8 Jun 2022 02:57:00 +0000 (21:57 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 8 Jun 2022 03:17:00 +0000 (22:17 -0500)
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
include/deal.II/base/config.h.in
include/deal.II/numerics/rtree.h

index f79fb6072ff28108ff0e41adf1d972d7a1eee968..b9aa2a443a9eb278fba0bc689023b582aa1aa331 100644 (file)
 #include <deal.II/boost_adaptors/segment.h>
 
 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
-#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
-#  define BOOST_ALLOW_DEPRECATED_HEADERS
-#endif
 #include <boost/geometry/index/rtree.hpp>
 #include <boost/geometry/strategies/strategies.hpp>
-#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
-#  undef BOOST_ALLOW_DEPRECATED_HEADERS
-#endif
 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 
index 706fb4a28b14563504da29870e5b4602d25a49e3..07b3da84af2a19bc57183e76dd4a0fdfe70fe537 100644 (file)
 
 /* 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
index f23cc7e6a2b93e3a8c0afdec1eab39ccb39a3d04..3ebade3fde06f07d8aee33dba601f7409de9dbfa 100644 (file)
 
 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
 #include <boost/geometry/algorithms/distance.hpp>
-
-#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
-#  define BOOST_ALLOW_DEPRECATED_HEADERS
-#endif
 #include <boost/geometry/index/rtree.hpp>
 #include <boost/geometry/strategies/strategies.hpp>
-#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
-#  undef BOOST_ALLOW_DEPRECATED_HEADERS
-#endif
 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 #include <memory>

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.