Enable Sphinx todo directive for GMX_DEVELOPER_BUILD.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 26 Dec 2019 14:35:50 +0000 (17:35 +0300)
committerM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 26 Dec 2019 16:03:57 +0000 (19:03 +0300)
Activates the `todo` and `todolist` directives from the Sphinx "todo"
extension when the GMX_DEVELOPER_BUILD CMake option is set.

Change-Id: Ibde6f750e3b657f0fd826d3ad4c8a1865acc499d

docs/CMakeLists.txt

index 954905403111efeb96eb77b14f03af653b0904f6..568c798c4697bc5d9897ec20f1da288186c0c532 100644 (file)
@@ -606,6 +606,10 @@ if (SPHINX_FOUND)
 
     # Sphinx cache with pickled ReST documents
     set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
+    set(SPHINX_CONFIG_OVERRIDES "")
+    if (GMX_DEVELOPER_BUILD)
+        set(SPHINX_CONFIG_OVERRIDES "-D todo_include_todos=1")
+    endif()
     add_custom_target(webpage-sphinx
         DEPENDS sphinx-programs
         DEPENDS sphinx-input
@@ -618,6 +622,7 @@ if (SPHINX_FOUND)
             -q -b html
             -w sphinx-html.log
             -d "${SPHINX_CACHE_DIR}"
+            ${SPHINX_CONFIG_OVERRIDES}
             "${SPHINX_INPUT_DIR}"
             "${HTML_OUTPUT_DIR}"
         WORKING_DIRECTORY