From 60c5540dbf2ea2f0a013fdb57f5dfbd8fa35888a Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Sun, 15 Jul 2018 18:57:01 +0200 Subject: [PATCH] doc: cmake: Conditionally add USES_TERMINAL to html targets When using Ninja, output will be buffered until the command completes unless USES_TERMINAL is used. Use USES_TERMINAL here so that output is sent directly to the terminal without having to wait. This is a bit of an abuse of the Ninja console pool, but for building documentation this should not be an issue since it's a self-contained CMake project. Note that this is done conditionally, only when Sphinx output is not disabled by using its "-q" flag. Signed-off-by: Carles Cufi --- doc/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 08ea587225c..7dfd0b190a1 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -29,6 +29,12 @@ endif() # Internal variables. set(ALLSPHINXOPTS -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees ${SPHINXOPTS}) +if("-q" IN_LIST ALLSPHINXOPTS) + set(SPHINX_USES_TERMINAL ) +else() + set(SPHINX_USES_TERMINAL USES_TERMINAL) +endif() + # the i18n builder cannot share the environment and doctrees with the others set(I18NSPHINXOPTS ${SPHINXOPTS}) @@ -108,6 +114,7 @@ add_custom_target( COMMAND ${CMAKE_COMMAND} -E remove_directory samples COMMAND ${CMAKE_COMMAND} -E remove_directory boards WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + ${SPHINX_USES_TERMINAL} ) add_dependencies(html content doxy kconfig)