Skip to content

Commit

Permalink
[SCons] Add configuration for Sphinx options
Browse files Browse the repository at this point in the history
The default will exit the Sphinx build with error code 1 if any warnings
are encountered, but it will print all the warnings from a single run.

Since all the warnings from Sphinx are now resolved, this change means
that any CI failures due to warnings from Sphinx should be fixed before
merging a pull request.
  • Loading branch information
bryanwweber authored and speth committed Feb 12, 2021
1 parent daa3666 commit 44ed264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ defaults.debugLinkFlags = ''
defaults.noDebugLinkFlags = ''
defaults.warningFlags = '-Wall'
defaults.buildPch = False
defaults.sphinx_options = '-W --keep-going'
env['pch_flags'] = []
env['openmp_flag'] = ['-fopenmp'] # used to generate sample build scripts

Expand Down Expand Up @@ -439,6 +440,12 @@ config_options = [
'sphinx_cmd',
"""Command to use for building the Sphinx documentation.""",
'sphinx-build', PathVariable.PathAccept),
(
"sphinx_options",
"""Options passed to the 'sphinx_cmd' command line. Separate multiple
options with spaces, for example, "-W --keep-going".""",
defaults.sphinx_options,
),
EnumVariable(
'system_eigen',
"""Select whether to use Eigen from a system installation ('y'), from a
Expand Down
2 changes: 1 addition & 1 deletion doc/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if localenv['sphinx_docs']:

sphinxdocs = build(localenv.Command('${SPHINXBUILD}/html/index.html',
'sphinx/conf.py',
'${sphinx_cmd} -b html -d ${SPHINXBUILD}/doctrees ${SPHINXSRC} ${SPHINXBUILD}/html'))
'${sphinx_cmd} ${sphinx_options} -b html -d ${SPHINXBUILD}/doctrees ${SPHINXSRC} ${SPHINXBUILD}/html'))
env.Alias('sphinx', sphinxdocs)
env.Depends(sphinxdocs, env['python_module'])

Expand Down

0 comments on commit 44ed264

Please sign in to comment.