diff --git a/share/rocmcmakebuildtools/cmake/ROCMSphinxDoc.cmake b/share/rocmcmakebuildtools/cmake/ROCMSphinxDoc.cmake index 47b4c0db..d3c25e1d 100755 --- a/share/rocmcmakebuildtools/cmake/ROCMSphinxDoc.cmake +++ b/share/rocmcmakebuildtools/cmake/ROCMSphinxDoc.cmake @@ -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}") @@ -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})