From 3db8d2be23ef42e27aa6cd36c5326ce82340bac6 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Thu, 15 Jul 2021 10:22:42 +0200 Subject: [PATCH] doc: cmake: allow to override LATEXMKOPTS This is useful if the user wants to set specific latexmk options, e.g. -quiet for CI. Signed-off-by: Gerard Marull-Paretas --- doc/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 4c9ded3fd9f..22052b01ae0 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -13,10 +13,12 @@ message(STATUS "Zephyr base: ${ZEPHYR_BASE}") # Options set(SPHINXOPTS "-j auto" CACHE STRING "Default Sphinx Options") +set(LATEXMKOPTS "-halt-on-error -no-shell-escape" CACHE STRING "Default latexmk options") set(DOC_TAG "development" CACHE STRING "Documentation tag") set(DTS_ROOTS "${ZEPHYR_BASE}" CACHE STRING "DT bindings root folders") separate_arguments(SPHINXOPTS) +separate_arguments(LATEXMKOPTS) #------------------------------------------------------------------------------- # Dependencies @@ -260,7 +262,7 @@ if(LATEX_PDFLATEX_FOUND AND LATEXMK) add_custom_target( pdf - COMMAND ${CMAKE_COMMAND} -E env LATEXMKOPTS="-halt-on-error;-no-shell-escape" + COMMAND ${CMAKE_COMMAND} -E env LATEXMKOPTS="${LATEXMKOPTS}" ${PDF_BUILD_COMMAND} WORKING_DIRECTORY ${DOCS_LATEX_DIR} COMMENT "Building PDF file..."