message(FATAL_ERROR
"Could not find doxygen which is required for building the documentation"
)
+else()
+ message(STATUS "Using doxygen version ${DOXYGEN_VERSION}")
endif()
endif()
+# doxygen version 1.9.1 can not correctly parse C++20-style 'requires'
+# clauses and just drops certain classes and shows documentation for
+# DEAL_II_CXX20_REQUIRES instead. 1.9.7 gets this right, but has other
+# bugs. It's unclear for versions inbetween. Err on the safe side, and
+# only make them visible to doxygen if we have at least 1.9.8.
+if(${DOXYGEN_VERSION} VERSION_LESS 1.9.8)
+ message(STATUS "Suppressing 'requires' clause parsing because doxygen is too old")
+ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/options.dox"
+ "
+ PREDEFINED += DEAL_II_DOXYGEN_DO_NOT_PARSE_REQUIRES_CLAUSES=1
+ PREDEFINED += DEAL_II_CXX20_REQUIRES(x)=
+ "
+ )
+endif()
+
+
########################################################################
#
* define a convenience macro that allows us to write a 'requires'
* clause that is simply removed when not using C++20.
*/
-#ifdef DEAL_II_HAVE_CXX20
+#if defined(DEAL_II_HAVE_CXX20) && !defined(DEAL_II_DOXYGEN_DO_NOT_PARSE_REQUIRES_CLAUSES)
# define DEAL_II_CXX20_REQUIRES(condition) requires(condition)
#else
# define DEAL_II_CXX20_REQUIRES(condition)