Skip to content

Commit 7eae01a

Browse files
committed
COMP: Make the Sphinx linkcheck optional
The linkcheck can sporatically timeout and fail. Make it optional to avoid false positives in CI.
1 parent 0e0de5f commit 7eae01a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMake/FindSphinx.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ option( SPHINX_EPUB_OUTPUT "Build HTML pages with additional information for bui
6464
option( SPHINX_LATEX_OUTPUT "Build LaTeX sources that can be compiled to a PDF document using pdflatex." OFF )
6565
option( SPHINX_MAN_OUTPUT "Build manual pages in groff format for UNIX systems." OFF )
6666
option( SPHINX_TEXT_OUTPUT "Build plain text files." OFF )
67+
option( SPHINX_LINKCHECK "Create a target that will check HTTP links." OFF )
6768

6869

6970
mark_as_advanced(
@@ -77,6 +78,7 @@ mark_as_advanced(
7778
SPHINX_LATEX_OUTPUT
7879
SPHINX_MAN_OUTPUT
7980
SPHINX_TEXT_OUTPUT
81+
SPHINX_LINKCHECK
8082
)
8183

8284
function( Sphinx_add_target target_name builder conf source destination )
@@ -152,7 +154,7 @@ function( Sphinx_add_targets target_base_name conf source base_destination )
152154
add_dependencies( ${target_base_name}_text ${_dependencies} )
153155
endif()
154156

155-
if( ${BUILD_TESTING} )
157+
if( ${SPHINX_LINKCHECK} )
156158
sphinx_add_target( ${target_base_name}_linkcheck linkcheck ${conf} ${source} ${base_destination}/linkcheck )
157159

158160
add_dependencies( ${target_base_name}_linkcheck ${_dependencies} )

Superbuild/Superbuild.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ if(BUILD_DOCUMENTATION)
9494
"-DSPHINX_MAN_OUTPUT:BOOL=${SPHINX_MAN_OUTPUT}"
9595
"-DSPHINX_QTHELP_OUTPUT:BOOL=${SPHINX_QTHELP_OUTPUT}"
9696
"-DSPHINX_TEXT_OUTPUT:BOOL=${SPHINX_TEXT_OUTPUT}"
97+
"-DSPHINX_LINKCHECK:BOOL=${SPHINX_LINKCHECK}"
9798
)
9899
endif()
99100

0 commit comments

Comments
 (0)