Add CMake flag for enabling doxygen XML generation

release/4.3a0
Yashas Ambati 2025-03-27 12:48:15 -04:00
parent 93eaf73fb3
commit 65ea0112c5
3 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,7 @@ option(GTSAM_BUILD_DOCS "Enable/Disable building of doxygen doc
# configure doxygen
option(GTSAM_BUILD_DOC_HTML "Enable/Disable doxygen HTML output" ON)
option(GTSAM_BUILD_DOC_LATEX "Enable/Disable doxygen LaTeX output" OFF)
option(GTSAM_GENERATE_DOC_XML "Enable/Disable doxygen XML output" OFF)
# add a target to generate API documentation with Doxygen
if (GTSAM_BUILD_DOCS)
@ -20,6 +21,12 @@ if (GTSAM_BUILD_DOCS)
set(GTSAM_BUILD_DOC_LATEX_YN "NO")
endif()
if (GTSAM_GENERATE_DOC_XML)
set(GTSAM_GENERATE_XML_YN "YES")
else()
set(GTSAM_GENERATE_XML_YN "NO")
endif()
# GTSAM core subfolders
set(gtsam_doc_subdirs
gtsam/base

View File

@ -2120,7 +2120,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML = NO
GENERATE_XML = @GTSAM_GENERATE_XML_YN@
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

View File

@ -42,10 +42,9 @@ See Windows Installation in INSTALL.md in the root directory.
The wrap library provides for building the Python wrapper with docstrings included, sourced from the C++ Doxygen comments. To build the Python wrapper with docstrings, follow these instructions:
1. Change `GENERATE_XML` in `doc/Doxyfile.in` to `YES`.
2. Build GTSAM. This will compile the `doc/Doxyfile.in` into a `Doxyfile`.
3. From the project root directory, run `doxygen build/<build_name>/doc/Doxyfile`. This will generate the Doxygen XML documentation in `xml/`.
4. Build the Python wrapper with the CMake option `GTWRAP_ADD_DOCSTRINGS` enabled.
1. Build GTSAM with the flag `-DGTSAM_GENERATE_DOC_XML=1`. This will compile the `doc/Doxyfile.in` into a `Doxyfile` with `GENERATE_XML` set to `ON`.
2. From the project root directory, run `doxygen build/<build_name>/doc/Doxyfile`. This will generate the Doxygen XML documentation in `xml/`.
3. Build the Python wrapper with the CMake option `GTWRAP_ADD_DOCSTRINGS` enabled.
## Unit Tests