# we provide the path to the produced html output in the console
# for tools that support URI protocol schemes
- set(html_extra_commands
+ set(html_post_commands
COMMAND ${CMAKE_COMMAND} -E echo "sphinx-build html: HTML documentation generated in file://${CMAKE_CURRENT_BINARY_DIR}/html/index.html"
)
# Sphinx texinfo builder supports .info, .txt, .html and .pdf output.
# SPHINX_INFO controls the .info output.
- set(texinfo_extra_commands
+ set(texinfo_post_commands
COMMAND ${MAKEINFO_EXECUTABLE} --no-split -o
${CMAKE_CURRENT_BINARY_DIR}/texinfo/cmake.info
${CMAKE_CURRENT_BINARY_DIR}/texinfo/cmake.texi
endif()
list(APPEND doc_formats qthelp)
- set(qthelp_extra_commands
+ set(qthelp_post_commands
# Workaround for assistant prior to
# https://codereview.qt-project.org/#change,82250 in Qt 4.
COMMAND ${CMAKE_COMMAND} "-DCSS_DIR=${CMAKE_CURRENT_BINARY_DIR}/qthelp/_static"
list(APPEND doc_html_opts -A outdated=1)
endif()
- list(APPEND qthelp_extra_commands
+ list(APPEND html_pre_commands
+ COMMAND ${CMAKE_COMMAND} -Dversion=${CMake_VERSION} -P ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_archive.cmake
+ )
+
+ list(APPEND qthelp_post_commands
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qch"
"${CMAKE_CURRENT_BINARY_DIR}/html/CMake.qch"
# arguments in peculiar order
add_custom_command(
OUTPUT ${doc_format_output}
+ ${${format}_pre_commands}
COMMAND ${SPHINX_EXECUTABLE}
-M ${format}
${CMake_SOURCE_DIR}/Help
${sphinx_flags}
${doc_${format}_opts}
> ${doc_format_log} # log stdout, pass stderr
- ${${format}_extra_commands}
+ ${${format}_post_commands}
DEPENDS ${doc_format_last}
COMMENT "sphinx-build ${format}: see Utilities/Sphinx/${doc_format_log}"
VERBATIM
# other formats use standard builder (-b) mode
add_custom_command(
OUTPUT ${doc_format_output}
+ ${${format}_pre_commands}
COMMAND ${SPHINX_EXECUTABLE}
-c ${CMAKE_CURRENT_BINARY_DIR}
-d ${CMAKE_CURRENT_BINARY_DIR}/${doctrees}
${CMake_SOURCE_DIR}/Help
${CMAKE_CURRENT_BINARY_DIR}/${format}
> ${doc_format_log} # log stdout, pass stderr
- ${${format}_extra_commands}
+ ${${format}_post_commands}
DEPENDS ${doc_format_last}
COMMENT "sphinx-build ${format}: see Utilities/Sphinx/${doc_format_log}"
VERBATIM