Improve stability of parallel documentation build
authorPaul Bauer <paul.bauer.q@gmail.com>
Wed, 5 Sep 2018 12:13:43 +0000 (14:13 +0200)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 5 Sep 2018 12:13:43 +0000 (14:13 +0200)
More changes to the way the doxygen environment is set up when preparing
the build and fixing one bug that made the documentation build sometimes
unstable due to a race between the creation of the doxygen xml files and
the user documentation depending on it.

Change-Id: I26f6281da5fac4b28d98be4baa7b9ac221c3d40d

docs/doxygen/CMakeLists.txt

index 91c73f44f06275e83b24787310412742ff79d6c3..150d6c6031642d00663fb08db25f2ab8e6485322 100644 (file)
@@ -85,12 +85,17 @@ if (DOXYGEN_FOUND)
     if (GMX_COMPACT_DOXYGEN)
         set(DOXYGEN_EXTRA_SETTINGS "@INCLUDE   = ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile-compact")
     endif()
-    configure_file(Doxyfile-common.cmakein Doxyfile-common)
-    configure_file(Doxyfile-dev.cmakein Doxyfile-dev)
-    configure_file(Doxyfile-full.cmakein Doxyfile-full)
-    configure_file(Doxyfile-lib.cmakein Doxyfile-lib)
-    configure_file(Doxyfile-user.cmakein Doxyfile-user)
-    configure_file(Doxyfile-xml.cmakein Doxyfile-xml)
+    set(DOXYGENLIST "html-full;html-lib;html-user;xml")
+    foreach(_target ${DOXYGENLIST})
+        set(_targetdir ${HTML_OUTPUT_DIR}/doxygen/${_target})
+        if (NOT EXISTS ${_targetdir})
+            file(MAKE_DIRECTORY ${_targetdir})
+        endif()
+    endforeach()
+    set(DOXYGENLIST "common;dev;full;lib;user;xml")
+    foreach(_target ${DOXYGENLIST})
+        configure_file(Doxyfile-${_target}.cmakein Doxyfile-${_target})
+    endforeach()
 
     configure_file(RunDoxygen.cmake.cmakein RunDoxygen.cmake @ONLY)
     gmx_configure_version_file(Doxyfile-version.cmakein Doxyfile-version
@@ -140,7 +145,7 @@ if (DOXYGEN_FOUND)
                 list(APPEND _deps dep-graphs-dot)
             endif()
         endif()
-        list (FIND ARGN "DEPGRAPHS" _index)
+        list (FIND ARGN "DEPXML" _index)
         if (${_index} GREATER -1)
             list(APPEND _deps doxygen-xml)
         endif()