Utilities/Sphinx: Add option to build 'text' format

Add SPHINX_TEXT to enable the Sphinx 'text' builder.  Mark it as
advanced and do not add install rules.  This is intended for use
by the release manager to build the release notes in text format
suitable for email.
This commit is contained in:
Brad King 2014-02-04 10:09:40 -05:00
parent 3611d77b6d
commit 34ea1f1520
1 changed files with 7 additions and 1 deletions

View File

@ -24,12 +24,15 @@ project(CMakeHelp NONE)
option(SPHINX_MAN "Build man pages with Sphinx" OFF) option(SPHINX_MAN "Build man pages with Sphinx" OFF)
option(SPHINX_HTML "Build html help with Sphinx" OFF) option(SPHINX_HTML "Build html help with Sphinx" OFF)
option(SPHINX_TEXT "Build text help with Sphinx (not installed)" OFF)
find_program(SPHINX_EXECUTABLE find_program(SPHINX_EXECUTABLE
NAMES sphinx-build NAMES sphinx-build
DOC "Sphinx Documentation Builder (sphinx-doc.org)" DOC "Sphinx Documentation Builder (sphinx-doc.org)"
) )
if(NOT SPHINX_MAN AND NOT SPHINX_HTML) mark_as_advanced(SPHINX_TEXT)
if(NOT SPHINX_MAN AND NOT SPHINX_HTML AND NOT SPHINX_TEXT)
return() return()
elseif(NOT SPHINX_EXECUTABLE) elseif(NOT SPHINX_EXECUTABLE)
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!") message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
@ -57,6 +60,9 @@ endif()
if(SPHINX_MAN) if(SPHINX_MAN)
list(APPEND doc_formats man) list(APPEND doc_formats man)
endif() endif()
if(SPHINX_TEXT)
list(APPEND doc_formats text)
endif()
set(doc_format_outputs "") set(doc_format_outputs "")
set(doc_format_last "") set(doc_format_last "")