]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure the .inst files are available as inputs for doxygen. 6602/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 16 May 2018 06:45:10 +0000 (14:45 +0800)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 16 May 2018 06:45:10 +0000 (14:45 +0800)
We let doxygen read the .cc files, but then it complains that the .inst files are not
available that we #include at the ends of the .cc files. Fix this by ensuring that
doxygen knows which directories these files are available in.

doc/doxygen/CMakeLists.txt
doc/doxygen/options.dox.in

index c8711f336b67285559edbe18bf7aaf49995fcb39..0fcb346f52fe709b04f2022bbeb04ba2701c8fb2 100644 (file)
@@ -81,6 +81,28 @@ ELSE()
 ENDIF()
 
 
+# Collect where the build system will write the .inst files after
+# expansion from the .inst.in files. We need this because we let
+# doxygen read the .cc files and they #include the .inst files.
+#
+# To get at this, find all of the .inst.in files, strip all but the
+# directory name under $CMAKE_SOURCE_DIR/source, and then prepend
+# the build directory to it
+FILE(GLOB _inst_in_files
+     "${CMAKE_SOURCE_DIR}/source/*/*.inst.in")
+STRING(REPLACE "${CMAKE_SOURCE_DIR}/source/" "" _inst_in_dirs_x "${_inst_in_files}")
+STRING(REGEX REPLACE "/[a-zA-Z0-9_\\.]*.inst.in" "/" _inst_in_dirs_y "${_inst_in_dirs_x}")
+LIST(REMOVE_DUPLICATES _inst_in_dirs_y)
+SET(_inst_in_dirs "")
+FOREACH (_dir ${_inst_in_dirs_y})
+  SET(_inst_in_dirs "${_inst_in_dirs} ${CMAKE_BINARY_DIR}/source/${_dir}")
+ENDFOREACH()
+
+MESSAGE(STATUS "translated this into")
+MESSAGE(STATUS "found ${_inst_in_dirs}")
+
+# Generate the input files for doxygen using template .in files in which
+# we have to substitute some CMake variables
 CONFIGURE_FILE(
   ${CMAKE_CURRENT_SOURCE_DIR}/options.dox.in
   ${CMAKE_CURRENT_BINARY_DIR}/options.dox
@@ -245,6 +267,7 @@ ADD_CUSTOM_COMMAND(
     ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml
     ${CMAKE_CURRENT_SOURCE_DIR}/scripts/filter
     ${_doxygen_depend}
+    expand_all_instantiations
   COMMENT "Generating documentation via doxygen."
   VERBATIM
   )
index df538191f92eaee5ebfb46bac27dcbfdbb5246eb..2fc6c6c929b20555fbc9796bb5ad1b407b87cf46 100644 (file)
@@ -155,7 +155,7 @@ ENABLE_PREPROCESSING   = YES
 MACRO_EXPANSION        = YES
 EXPAND_ONLY_PREDEF     = YES
 SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = @CMAKE_SOURCE_DIR@/include @CMAKE_BINARY_DIR@/include
+INCLUDE_PATH           = @CMAKE_SOURCE_DIR@/include @CMAKE_BINARY_DIR@/include @_inst_in_dirs@
 INCLUDE_FILE_PATTERNS  =
 
 # set a few variables that help us generate documentation for

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.