Reorganize Doxygen build.
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 23 Jul 2012 15:55:44 +0000 (18:55 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 29 Jul 2012 00:04:54 +0000 (02:04 +0200)
- All doxygen-related cmake code and input files are now under
  doxygen/.
- Renamed the unsuffixed Doxyfile to Doxyfile-full for consistency, and
  renamed the output directory and custom target as well.
- Added a target to build all three types of doxygen documentation in
  one go.
- Added an index.html file as a starting point for browsing all three
  levels of documentation.

Related to #638.

Change-Id: Ia977c1aa93c55f152a15e560a60c8a1323e5d3f8

.gitignore
CMakeLists.txt
doxygen/.gitignore [new file with mode: 0644]
doxygen/CMakeLists.txt [new file with mode: 0644]
doxygen/Doxyfile-common.cmakein [moved from Doxyfile-common.cmakein with 97% similarity]
doxygen/Doxyfile-full.cmakein [moved from Doxyfile.cmakein with 90% similarity]
doxygen/Doxyfile-lib.cmakein [moved from Doxyfile-lib.cmakein with 90% similarity]
doxygen/Doxyfile-user.cmakein [moved from Doxyfile-user.cmakein with 91% similarity]
doxygen/index.html [new file with mode: 0644]

index 029396348f794c195b26c62eba8fc43ca109583a..3c8df1e29a09d33d4da51efa34d32779ec4df2be 100644 (file)
@@ -9,10 +9,6 @@ config.h
 log
 Makefile
 lib*.pc
-Doxyfile
-Doxyfile-lib
-Doxyfile-user
-doxygen-doc
 .project
 .cproject
 CMakeLists.txt.user
index a331dd8d9287bc0ce45f5c225bc0765cee5d319b..d0a1216a80660f5e56d1797b479e16d966290123 100644 (file)
@@ -508,8 +508,6 @@ endif (LIBXML2_FOUND)
 mark_as_advanced(GMX_BUILD_UNITTESTS)
 set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/cmake/legacy_and_external.supp)
 
-find_package(Doxygen)
-
 ########################################################################
 # Generate development version info for cache
 ########################################################################
@@ -985,6 +983,7 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 endif()
 
+add_subdirectory(doxygen)
 add_subdirectory(share)
 add_subdirectory(src)
 add_subdirectory(scripts)
@@ -1002,39 +1001,6 @@ ADD_CUSTOM_TARGET(uninstall
                   "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
 ###########################
 
-########################################################################
-# Doxygen configuration
-########################################################################
-if (DOXYGEN_FOUND)
-    FILE(GLOB NB_KERNEL_DIRS src/gromacs/gmxlib/nonbonded/nb_kernel_*/)
-    LIST(REMOVE_ITEM NB_KERNEL_DIRS
-         ${CMAKE_SOURCE_DIR}/src/gromacs/gmxlib/nonbonded/nb_kernel_c)
-    FOREACH(NB_KERNEL_DIR ${NB_KERNEL_DIRS})
-        SET(NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN
-            "${NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN} \\\n                         ${NB_KERNEL_DIR}")
-    ENDFOREACH(NB_KERNEL_DIR)
-    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile-common.cmakein
-                   ${CMAKE_BINARY_DIR}/Doxyfile-common)
-    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile.cmakein
-                   ${CMAKE_BINARY_DIR}/Doxyfile)
-    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile-lib.cmakein
-                   ${CMAKE_BINARY_DIR}/Doxyfile-lib)
-    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile-user.cmakein
-                   ${CMAKE_BINARY_DIR}/Doxyfile-user)
-    add_custom_target(doc
-      ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      COMMENT "Generating full documentation with Doxygen" VERBATIM)
-    add_custom_target(doc-user
-      ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-user
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      COMMENT "Generating user documentation with Doxygen" VERBATIM)
-    add_custom_target(doc-lib
-      ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-lib
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-      COMMENT "Generating libary documentation with Doxygen" VERBATIM)
-endif (DOXYGEN_FOUND)
-
 
 ########################################################################
 # Tests                                                                #
diff --git a/doxygen/.gitignore b/doxygen/.gitignore
new file mode 100644 (file)
index 0000000..67a695d
--- /dev/null
@@ -0,0 +1,5 @@
+Doxyfile*
+doxygen-*.log
+html-full
+html-lib
+html-user
diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..bfb76da
--- /dev/null
@@ -0,0 +1,34 @@
+find_package(Doxygen)
+
+########################################################################
+# Doxygen configuration
+########################################################################
+if (DOXYGEN_FOUND)
+    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(NB_KERNEL_DIR ${NB_KERNEL_DIRS})
+        SET(NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN
+            "${NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN} \\\n                         ${NB_KERNEL_DIR}")
+    ENDFOREACH(NB_KERNEL_DIR)
+    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)
+    FILE(COPY index.html DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+    add_custom_target(doc-full
+        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-full
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        COMMENT "Generating full documentation with Doxygen" VERBATIM)
+    add_custom_target(doc-lib
+        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-lib
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        COMMENT "Generating library documentation with Doxygen" VERBATIM)
+    add_custom_target(doc-user
+        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-user
+        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        COMMENT "Generating user documentation with Doxygen" VERBATIM)
+    add_custom_target(doc-all)
+    add_dependencies(doc-all doc-full doc-lib doc-user)
+endif (DOXYGEN_FOUND)
similarity index 97%
rename from Doxyfile-common.cmakein
rename to doxygen/Doxyfile-common.cmakein
index 5bb08509625837d6be76e7b33aa87234a7e8e784..4087457a1ba634e472502a43bcf690a8b783fb39 100644 (file)
@@ -1,6 +1,5 @@
 PROJECT_NAME           = @CMAKE_PROJECT_NAME@
 PROJECT_NUMBER         = @PROJECT_VERSION@
-OUTPUT_DIRECTORY       = doxygen-doc
 INPUT                  = @CMAKE_SOURCE_DIR@/src \
                          @CMAKE_SOURCE_DIR@/share/template
 EXAMPLE_PATH           = @CMAKE_SOURCE_DIR@
similarity index 90%
rename from Doxyfile.cmakein
rename to doxygen/Doxyfile-full.cmakein
index 9feca27e63e1037d8029a15d461a5cd49fbfb42e..9f3c8e8777ec327df15894e4a4d9d25e0aa2c0df 100644 (file)
@@ -9,7 +9,8 @@ INTERNAL_DOCS          = YES
 EXTRACT_STATIC         = YES
 EXTRACT_LOCAL_CLASSES  = YES
 HIDE_UNDOC_CLASSES     = YES
-WARN_LOGFILE           = doxygen-doc/doxygen.log
+WARN_LOGFILE           = doxygen-full.log
+HTML_OUTPUT            = html-full
 
 INLINE_INHERITED_MEMB  = NO  # Makes it easier to go through all documentation
 
similarity index 90%
rename from Doxyfile-lib.cmakein
rename to doxygen/Doxyfile-lib.cmakein
index d2c9c504eb53fe839dee8d1d22dbacfe0a3e5d59..fdec36907e46c157ccfb0b30d3595154f07503fe 100644 (file)
@@ -3,7 +3,7 @@
 ENABLED_SECTIONS       = libapi
 INTERNAL_DOCS          = NO
 HIDE_UNDOC_CLASSES     = YES
-WARN_LOGFILE           = doxygen-doc/doxygen-lib.log
+WARN_LOGFILE           = doxygen-lib.log
 HTML_OUTPUT            = html-lib
 
 ALIASES               += inpublicapi="\ingroup group_publicapi"
similarity index 91%
rename from Doxyfile-user.cmakein
rename to doxygen/Doxyfile-user.cmakein
index b0b6c7132e6d9f392437798068441e824bc401bf..891cfe847c6a6b71f615b5a3627bc108e8bab001 100644 (file)
@@ -4,7 +4,7 @@ ENABLED_SECTIONS       =
 INTERNAL_DOCS          = NO
 HIDE_UNDOC_CLASSES     = YES
 HIDE_FRIEND_COMPOUNDS  = YES
-WARN_LOGFILE           = doxygen-doc/doxygen-user.log
+WARN_LOGFILE           = doxygen-user.log
 HTML_OUTPUT            = html-user
 
 ALIASES               += inpublicapi="\ingroup group_publicapi"
diff --git a/doxygen/index.html b/doxygen/index.html
new file mode 100644 (file)
index 0000000..daf7d13
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+<body>
+    <h1>Doxygen documentation for Gromacs</h1>
+    <p>
+        Each set of documentation below includes all the information from
+        the sets above it.
+    </p>
+    <ul>
+        <li><a href="html-user/index.html">Public API documentation</a></li>
+        <li><a href="html-lib/index.html">Library documentation, excluding intramodule documentation</a></li>
+        <li><a href="html-full/index.html">Full documentation including internal functions</a></li>
+    </ul>
+</body>
+</html>