From 9682f1beccc198331f1680bddb5d949ed5f058da Mon Sep 17 00:00:00 2001 From: Sebastian Luzynski Date: Tue, 27 Feb 2024 14:02:32 +0000 Subject: [PATCH] SWDEV-447358 - Add build_doc target to hip-tests This change adds a new cmake target to generate test plan documentation using Doxygen. The target is called build_docs and it's not added to the default build commands, hence it needs to be called separately. Signed-off-by: Sebastian Luzynski Change-Id: I441524568e0513019ca21467950e48a551234802 [ROCm/hip-tests commit: 53406684eec7d5a8f1129979382171a2e95418d9] --- projects/hip-tests/catch/CMakeLists.txt | 16 ++++++++++++++++ projects/hip-tests/catch/DoxyfileTests | 4 ++-- .../catch/include/hip_test_defgroups.hh | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/catch/CMakeLists.txt b/projects/hip-tests/catch/CMakeLists.txt index e73460d0dd..7766df816c 100644 --- a/projects/hip-tests/catch/CMakeLists.txt +++ b/projects/hip-tests/catch/CMakeLists.txt @@ -320,3 +320,19 @@ add_custom_target(package_test COMMAND ${CMAKE_COMMAND} . COMMAND cpack WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif() + +# Doxygen documentation +# check if doxygen is installed +find_package(Doxygen) +if(DOXYGEN_FOUND) + # Configure Doxyfile with proper paths + set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/DoxyfileTests) + set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/DoxyfileTests.out) + configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) + + add_custom_target(build_docs + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} + COMMENT "Generating test plan documentation with Doxygen") +else() + message(STATUS "Doxygen was not found. Building test plan documentation will not be available") +endif() diff --git a/projects/hip-tests/catch/DoxyfileTests b/projects/hip-tests/catch/DoxyfileTests index 6fe1167e42..88ea8d00df 100644 --- a/projects/hip-tests/catch/DoxyfileTests +++ b/projects/hip-tests/catch/DoxyfileTests @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -829,7 +829,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = +INPUT = @CMAKE_CURRENT_SOURCE_DIR@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/projects/hip-tests/catch/include/hip_test_defgroups.hh b/projects/hip-tests/catch/include/hip_test_defgroups.hh index edb89cbc3e..090cd10a20 100644 --- a/projects/hip-tests/catch/include/hip_test_defgroups.hh +++ b/projects/hip-tests/catch/include/hip_test_defgroups.hh @@ -165,6 +165,7 @@ THE SOFTWARE. * @{ * This section describes the tests for Stream Ordered Memory Allocator functions of HIP runtime * API. + * @} */ /**