Skip to content

Commit

Permalink
Dont require sphinx to be installed (#144)
Browse files Browse the repository at this point in the history
* Dont require sphinx to be installed

* Dont require doxygen

* Fix doxygen variable name
  • Loading branch information
pfultz2 authored Sep 12, 2023
1 parent c044bb5 commit 5a34e72
Showing 1 changed file with 5 additions and 10 deletions.
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

0 comments on commit 5a34e72

Please sign in to comment.