Skip to content

Commit

Permalink
Make rocm_add_sphinx_doc OUTPUT_DIR relative to the source directory …
Browse files Browse the repository at this point in the history
…not build directory
  • Loading branch information
pfultz2 committed Oct 29, 2023
1 parent 3eb1a3b commit 815a723
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions share/rocmcmakebuildtools/cmake/ROCMSphinxDoc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function(rocm_add_sphinx_doc SRC_DIR)
endif()

if(PARSE_OUTPUT_DIR)
get_filename_component(OUTPUT_DIR "${PARSE_OUTPUT_DIR}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
get_filename_component(OUTPUT_DIR "${PARSE_OUTPUT_DIR}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
else()
if(DEFINED ROCM_CMAKE_DOCS_DIR)
set(OUTPUT_DIR "${ROCM_CMAKE_DOCS_DIR}")
Expand Down Expand Up @@ -94,8 +94,7 @@ function(rocm_add_sphinx_doc SRC_DIR)
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Building ${PARSE_BUILDER} documentation with Sphinx")
add_dependencies(sphinx-${BUILDER} ${PROJECT_NAME}-sphinx-${BUILDER})
rocm_clean_doc_output("${OUTPUT_DIR}/html")
rocm_clean_doc_output("${OUTPUT_DIR}/doctrees")
rocm_clean_doc_output("${OUTPUT_DIR}")
rocm_mark_as_doc(sphinx-${BUILDER})
if(PARSE_DEPENDS)
add_dependencies(sphinx-${BUILDER} ${PARSE_DEPENDS})
Expand Down

0 comments on commit 815a723

Please sign in to comment.