Remove/replace many mentions of Jenkins
[alexxy/gromacs.git] / docs / doxygen / CMakeLists.txt
index 3ce003eed2c41a5ee012a82a42ebfaac104e3ebb..6de85e4f6633f8dcf3f15c812003138310742125 100644 (file)
@@ -1,7 +1,8 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
+# Copyright (c) 2017,2018,2019,2020,2021, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -57,7 +58,7 @@ gmx_dependent_option(
 mark_as_advanced(GMX_COMPACT_DOXYGEN)
 
 set(USE_PYTHON_SCRIPTS OFF)
-if (PYTHONINTERP_FOUND AND NOT PYTHON_VERSION_STRING VERSION_LESS "2.6")
+if (Python3_Interpreter_FOUND)
     set(USE_PYTHON_SCRIPTS ON)
 endif()
 
@@ -71,25 +72,23 @@ set(INSTALLED_HEADERS_FILE ${PROJECT_BINARY_DIR}/src/gromacs/installed-headers.t
 #
 if (DOXYGEN_FOUND)
     # Generate Doxygen input configuration files
-    file(GLOB NB_KERNEL_DIRS
-         ${CMAKE_SOURCE_DIR}/src/gromacs/gmxlib/nonbonded/nb_kernel_*/)
-    list(REMOVE_ITEM NB_KERNEL_DIRS
-         ${CMAKE_SOURCE_DIR}/src/gromacs/gmxlib/nonbonded/nb_kernel_c)
-    foreach (dir ${NB_KERNEL_DIRS})
-        SET(NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN
-            "${NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN} \\\n                         ${dir}")
-    endforeach()
     set(DEPGRAPH_DIR ${CMAKE_CURRENT_BINARY_DIR}/depgraphs)
     set(DOXYGEN_SECTIONS "")
     set(DOXYGEN_EXTRA_SETTINGS "")
     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-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
@@ -120,7 +119,7 @@ if (DOXYGEN_FOUND)
     else()
         # If there is no git, we just update the stamp every time, and the
         # builds are triggered every time.  This should be rare enough, but
-        # this case still needs to be supported for the Jenkins job that builds
+        # this case still needs to be supported for the CI job that builds
         # the documentation for a release from the release tarball.
         gmx_add_custom_output_target(doxygen-source-timestamp
             RUN_ALWAYS OUTPUT STAMP
@@ -132,12 +131,17 @@ if (DOXYGEN_FOUND)
         set(_deps doxygen-source-timestamp doxygen-version
             ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-${TYPE})
         set(_fast_arg "")
-        if ("${ARGN}" STREQUAL "DEPGRAPHS")
+        list (FIND ARGN "DEPGRAPHS" _index)
+        if (${_index} GREATER -1)
             set(_fast_arg "ADD_FAST_TARGET")
             if (TARGET dep-graphs-dot)
                 list(APPEND _deps dep-graphs-dot)
             endif()
         endif()
+        list (FIND ARGN "DEPXML" _index)
+        if (${_index} GREATER -1)
+            list(APPEND _deps doxygen-xml)
+        endif()
         gmx_add_custom_output_target(${TARGET} OUTPUT STAMP ${_fast_arg}
             # Ensure the directory exists to avoid spurious warnings
             COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPGRAPH_DIR}
@@ -161,16 +165,14 @@ if (DOXYGEN_FOUND)
         # dependency on doxygen-xml takes care of that transitively.
         gmx_add_custom_output_target(dep-graphs-dot ADD_FAST_TARGET
             OUTPUT STAMP
-            COMMAND ${PYTHON_EXECUTABLE}
+            COMMAND ${Python3_EXECUTABLE}
                 ${CMAKE_CURRENT_SOURCE_DIR}/graphbuilder.py
                 -S ${CMAKE_SOURCE_DIR} -B ${CMAKE_BINARY_DIR}
-                --ignore-cycles ${CMAKE_CURRENT_SOURCE_DIR}/cycle-suppressions.txt
                 -o ${DEPGRAPH_DIR}
             DEPENDS doxygen-xml ${INSTALLED_HEADER_FILE}
                 ${CMAKE_CURRENT_SOURCE_DIR}/doxygenxml.py
                 ${CMAKE_CURRENT_SOURCE_DIR}/gmxtree.py
                 ${CMAKE_CURRENT_SOURCE_DIR}/graphbuilder.py
-                ${CMAKE_CURRENT_SOURCE_DIR}/cycle-suppressions.txt
             COMMENT "Generating include dependency graphs for dot"
             USES_TERMINAL)
 
@@ -190,9 +192,10 @@ if (DOXYGEN_FOUND)
     endif()
 
     # Create the actual targets to build the documentation.
-    add_doxygen_target(doxygen-full full "Generating full documentation with Doxygen" DEPGRAPHS)
-    add_doxygen_target(doxygen-lib  lib  "Generating library documentation with Doxygen" DEPGRAPHS)
-    add_doxygen_target(doxygen-user user "Generating public API documentation with Doxygen")
+    add_doxygen_target(doxygen-full full "Generating full documentation with Doxygen" DEPGRAPHS DEPXML)
+    add_doxygen_target(doxygen-lib  lib  "Generating library documentation with Doxygen" DEPGRAPHS DEPXML)
+    add_doxygen_target(doxygen-user user "Generating public API documentation with Doxygen" DEPXML)
+    add_doxygen_target(doxygen-dev dev "Generating verbose developer docs with Doxygen" DEPGRAPHS DEPXML)
     # Convenience targets to build all the documentation flavors.
     add_custom_target(doxygen-all)
     add_custom_target(doxygen-all-fast)
@@ -204,14 +207,13 @@ if (DOXYGEN_FOUND)
         # TODO: Consider whether this is the best location for this code,
         # since not all of it is Doxygen-specific (but nearly all of it
         # relies on the Doxygen XML documentation).
-        # The output .log file currently needs to be here, since Jenkins
+        # The output .log file currently needs to be here, since CI
         # expects that.
         set(check_source_command
-            ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check-source.py
+            ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check-source.py
             -S ${CMAKE_SOURCE_DIR} -B ${CMAKE_BINARY_DIR}
             -l ${CMAKE_CURRENT_BINARY_DIR}/check-source.log
-            --ignore ${CMAKE_CURRENT_SOURCE_DIR}/suppressions.txt
-            --ignore-cycles ${CMAKE_CURRENT_SOURCE_DIR}/cycle-suppressions.txt)
+            --ignore ${CMAKE_CURRENT_SOURCE_DIR}/suppressions.txt)
         add_custom_target(check-source      COMMAND ${check_source_command}
             COMMENT "Checking source code for various issues" VERBATIM USES_TERMINAL)
         add_custom_target(check-source-fast COMMAND ${check_source_command}