summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-30 13:30:14 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-30 13:41:31 (GMT)
commitdd107b30d26b2cdaa5b1766f733428f3c4c7cd42 (patch)
tree39443d9bdda1b0a0dc66ae2f9a876084fa62ae93 /Utilities
parent6064b9072c480845b2ba61291e467b42cb500fe6 (diff)
downloadCMake-dd107b30d26b2cdaa5b1766f733428f3c4c7cd42.zip
CMake-dd107b30d26b2cdaa5b1766f733428f3c4c7cd42.tar.gz
CMake-dd107b30d26b2cdaa5b1766f733428f3c4c7cd42.tar.bz2
Add option to pass custom flags to sphinx-build (#15545)
Create a SPHINX_FLAGS cache entry that users can populate with command-line flags for sphinx-build. Add an option to the bootstrap script to populate it up front. Suggested-by: Felix Geyer <debfx@ubuntu.com>
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Sphinx/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index da81752..a755ca1 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -31,8 +31,11 @@ find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Sphinx Documentation Builder (sphinx-doc.org)"
)
+set(SPHINX_FLAGS "" CACHE STRING "Flags to pass to sphinx-build")
+separate_arguments(sphinx_flags UNIX_COMMAND "${SPHINX_FLAGS}")
mark_as_advanced(SPHINX_TEXT)
+mark_as_advanced(SPHINX_FLAGS)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_SINGLEHTML AND NOT SPHINX_QTHELP AND NOT SPHINX_TEXT)
return()
@@ -114,6 +117,7 @@ foreach(format ${doc_formats})
-c ${CMAKE_CURRENT_BINARY_DIR}
-d ${CMAKE_CURRENT_BINARY_DIR}/doctrees
-b ${format}
+ ${sphinx_flags}
${CMake_SOURCE_DIR}/Help
${CMAKE_CURRENT_BINARY_DIR}/${format}
> ${doc_format_log} # log stdout, pass stderr