doc: cmake: Do not use USES_TERMINAL on latex/pdf targets

The following error appeared on documentation builds when enabling the
USES_TERMINAL flag:

  USES_TERMINAL may not be specified without any COMMAND

This is because targets without a command should not be using the flag
at all, so remove its usage from those. Instead, use it in the
add_custom_command() that actualy invokes sphinx.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2018-09-26 11:22:32 +02:00 committed by Carles Cufí
parent c065ebdfc2
commit 7599fad178
1 changed files with 1 additions and 2 deletions

View File

@ -156,12 +156,12 @@ add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${KI_SCRIPT} --config-dir ${CONFIG_DIR} --errors ${DOC_WARN} --warnings ${DOC_WARN} ${DOC_LOG}
COMMAND ${PYTHON_EXECUTABLE} ${FIX_TEX_SCRIPT} ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
${SPHINX_USES_TERMINAL}
)
add_custom_target(
latex
DEPENDS ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
${SPHINX_USES_TERMINAL}
)
#
@ -193,7 +193,6 @@ endif()
add_custom_target(
pdf
DEPENDS ${SPHINX_OUTPUT_DIR_PDF}/zephyr.pdf
${SPHINX_USES_TERMINAL}
)
endif()