Add CMake support for also building Markdown docs in parallel (#49)

This commit is contained in:
Jared Dillard
2025-10-26 20:11:09 -07:00
committed by GitHub
parent b63801bcff
commit e2a80faf04
7 changed files with 120 additions and 12 deletions
+27
View File
@@ -0,0 +1,27 @@
# SetupSphinx.cmake - Find Sphinx for CI environments
# Function to find Sphinx in the system
function(setup_sphinx_environment)
# Find sphinx-build executable in system
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Sphinx documentation generator"
)
if(NOT SPHINX_EXECUTABLE)
message(FATAL_ERROR "sphinx-build not found. Please install Sphinx.")
endif()
# Get Sphinx version
execute_process(
COMMAND ${SPHINX_EXECUTABLE} --version
OUTPUT_VARIABLE SPHINX_VERSION_OUTPUT
ERROR_VARIABLE SPHINX_VERSION_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Found Sphinx: ${SPHINX_EXECUTABLE}")
message(STATUS "${SPHINX_VERSION_OUTPUT}")
# Export to parent scope
set(SPHINX_EXECUTABLE "${SPHINX_EXECUTABLE}" PARENT_SCOPE)
endfunction()