Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sphinx fresh environment flag #37216

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/CMakeLists.txt
Expand Up @@ -11,6 +11,7 @@ set_property(CACHE DOCS_MATH_EXT PROPERTY STRINGS "sphinx.ext.imgmath" "sphinx.e
option(DOCS_PLOTDIRECTIVE "If enabled include plots generated with the plot directive. " OFF)
option(DOCS_QTHELP "If enabled add a target to build the qthelp documentation" ON)
option(SPHINX_WARNINGS_AS_ERRORS "non-zero exit if there are sphinx warnings" ON)
option(SPHINX_FRESH_ENV "Don't use a saved environment, but rebuild it completely" ON)

# Build layout
set(SPHINX_CONF_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source)
Expand Down Expand Up @@ -40,6 +41,11 @@ if(SPHINX_WARNINGS_AS_ERRORS)
else()
set(SPHINX_WARNINGS_AS_ERRORS_FLAG "")
endif()
if(SPHINX_FRESH_ENV)
set(SPHINX_FRESH_ENV_FLAG "-E")
else()
set(SPHINX_FRESH_ENV_FLAG "")
endif()

# Add a sphinx build target to build documentation builder - Name of the sphinx builder: html, qthelp etc target_name -
# Optional target name. Default=docs-${builder}
Expand All @@ -61,6 +67,7 @@ function(add_sphinx_build_target builder math_renderer)
${SPHINX_NOCOLOR}
${SPHINX_KEEPGOING}
${SPHINX_WARNINGS_AS_ERRORS_FLAG}
${SPHINX_FRESH_ENV_FLAG}
-b
${builder}
-d
Expand Down