Skip to content

Commit

Permalink
DONT MERGE
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Dec 27, 2023
1 parent a9a7373 commit 8710e0a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,15 @@ if(NOT_SUBPROJECT)
catch_discover_tests(errors_test)
endif()

# Build XML documentation
# Build documentation.
if(BUILD_DOCS)
find_package(Doxygen REQUIRED)

# Configure Doxygen to generate XML documentation.
set(DOXYGEN_GENERATE_HTML NO)
set(DOXYGEN_GENERATE_XML YES)
set(DOXYGEN_XML_OUTPUT ${TARGET_NAME})

include(cmake/add_xml_docs.cmake)
add_xml_docs(errors_docs include/errors/error.hpp)
endif()
Expand Down
13 changes: 13 additions & 0 deletions cmake/GenerateDocs.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Function to generate an XML documentation of a specific target.
# Arguments:
# - TARGET: The target for which to generate an XML documentation.
function(target_generate_xml_docs TARGET)
find_package(Doxygen REQUIRED)

# Configure Doxygen to generate an XML documentation.
set(DOXYGEN_GENERATE_HTML NO)
set(DOXYGEN_GENERATE_XML YES)
set(DOXYGEN_XML_OUTPUT ${TARGET}_docs)

doxygen_add_docs(${TARGET_NAME}_docs ${ARGN} USE_STAMP_FILE)
endfunction()
13 changes: 0 additions & 13 deletions cmake/add_xml_docs.cmake

This file was deleted.

0 comments on commit 8710e0a

Please # to comment.