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

Dont require sphinx to be installed #144

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions share/rocm/cmake/ROCMSphinxDoc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ find_program(
NAMES sphinx-build
HINTS "$ENV{SPHINX_DIR}"
PATH_SUFFIXES bin
DOC "Sphinx documentation generator"
REQUIRED)
DOC "Sphinx documentation generator")

find_program(
DOXYGEN_EXECUTABLE
Expand Down Expand Up @@ -61,14 +60,10 @@ function(rocm_add_sphinx_doc SRC_DIR)
list(APPEND VARS -A "${VAR}")
endforeach()

if(PARSE_USES_DOXYGEN)
if(NOT DOXYGEN_EXECUTABLE)
message(FATAL_ERROR
"rocm_add_sphinx_doc has USES_DOXYGEN set but DOXYGEN_EXECUTABLE is set to ${DOXYGEN_EXECUTABLE}.")
endif()
set(USES_DOXYGEN -D "doxygen_executable=${DOXYGEN_EXECUTABLE}")
if(PARSE_USE_DOXYGEN)
set(USE_DOXYGEN -D "doxygen_executable=${DOXYGEN_EXECUTABLE}")
else()
set(USES_DOXYGEN)
set(USE_DOXYGEN)
endif()

if(NOT TARGET sphinx-${BUILDER})
Expand All @@ -81,7 +76,7 @@ function(rocm_add_sphinx_doc SRC_DIR)
"${SPHINX_EXECUTABLE}"
-b ${PARSE_BUILDER}
-d "${CMAKE_CURRENT_BINARY_DIR}/doctrees"
${USES_DOXYGEN}
${USE_DOXYGEN}
${VARS}
"${SRC_DIR}"
"${OUTPUT_DIR}"
Expand Down