]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: add DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES check 13927/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 8 Jun 2022 03:14:51 +0000 (22:14 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 8 Jun 2022 03:22:00 +0000 (22:22 -0500)
cmake/configure/configure_50_cgal.cmake
include/deal.II/base/config.h.in

index 882170ed047fbb91c854a9bc3c1d37c696ffae8e..0b2331d7dee73e6f5fed9e41d0acd8cf18c6cf89 100644 (file)
@@ -54,4 +54,27 @@ MACRO(FEATURE_CGAL_FIND_EXTERNAL var)
   ENDIF()
 ENDMACRO()
 
+
+MACRO(FEATURE_CGAL_CONFIGURE_EXTERNAL)
+  # Similarly to the DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS check run
+  # in configure_20_boost.cmake we have to check whether cgal includes
+  # a deprecated boost header. If yes, disable the boost deprecated header
+  # warning as well.
+
+  LIST(APPEND CMAKE_REQUIRED_INCLUDES
+    ${BOOST_INCLUDE_DIRS} ${BOOST_BUNDLED_INCLUDE_DIRS} ${CGAL_INCLUDE_DIRS}
+    )
+
+  CHECK_CXX_COMPILER_BUG(
+    "
+    #define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
+    #define BOOST_HEADER_DEPRECATED(a) _Pragma(\"GCC error \\\"stop compilation\\\"\");
+    #include <CGAL/make_mesh_3.h>
+    int main() { return 0; }
+    "
+    DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES)
+
+  RESET_CMAKE_REQUIRED()
+ENDMACRO()
+
 CONFIGURE_FEATURE(CGAL)
index 07b3da84af2a19bc57183e76dd4a0fdfe70fe537..30d2e672ff179f9e15935656706ea978e8c48c48 100644 (file)
 /* cmake/modules/FindSYMENGINE.cmake */
 #cmakedefine DEAL_II_SYMENGINE_WITH_LLVM
 
-/* cmake/configure/configure_2_boost.cmake */
+/* cmake/configure/configure_20_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_50_cgal.cmake */
+#cmakedefine DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES
 
 /* cmake/configure/configure_2_trilinos.cmake */
 #cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
 #cmakedefine DEAL_II_TRILINOS_WITH_TPETRA
 #cmakedefine DEAL_II_TRILINOS_WITH_ZOLTAN
 
+#if defined(DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS) || \
+  defined(DEAL_II_CGAL_HAS_DEPRECATED_BOOST_INCLUDES)
+#  ifndef BOOST_ALLOW_DEPRECATED_HEADERS
+#    define BOOST_ALLOW_DEPRECATED_HEADERS
+#  endif
+#endif
 
 /***********************************************************************
  * Various macros for version number query and comparison:

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.