Skip to content

Commit 82a0c4c

Browse files
committed
Add Sphinx LaTeX output
1 parent 50fb502 commit 82a0c4c

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

cmake/AISDocumentation.cmake

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if(AIS_BUILD_DOCS)
6969
add_custom_target(doc
7070
# Step 1: Run Doxygen to produce XML for Breathe
7171
COMMAND "${DOXYGEN_EXECUTABLE}" "${AIS_DOXYFILE}"
72-
# Step 2: Run Sphinx, injecting the Doxygen paths via environment
72+
# Step 2: Run Sphinx (html), injecting the Doxygen paths via environment
7373
COMMAND
7474
${CMAKE_COMMAND} -E env
7575
"DOXYFILE_PATH=${AIS_DOXYFILE}"
@@ -81,6 +81,18 @@ if(AIS_BUILD_DOCS)
8181
"${HIPFILE_ROOT_PATH}/docs"
8282
"${AIS_SPHINX_BUILD_DIR}"
8383
-v
84+
# Step 3: Run Sphinx (LaTeX), injecting the Doxygen paths via environment
85+
COMMAND
86+
${CMAKE_COMMAND} -E env
87+
"DOXYFILE_PATH=${AIS_DOXYFILE}"
88+
"DOXYGEN_ROOT=${AIS_DOC_PATH}/doxygen"
89+
"DOXYGEN_XML_DIR=${AIS_DOXYGEN_XML_DIR}"
90+
"${Python3_EXECUTABLE}" -m sphinx
91+
-b latex
92+
-c "${AIS_DOC_PATH}/sphinx"
93+
"${HIPFILE_ROOT_PATH}/docs"
94+
"${AIS_SPHINX_BUILD_DIR}"
95+
-v
8496
WORKING_DIRECTORY "${AIS_DOC_PATH}"
8597
COMMENT "Generating hipFile API documentation with Doxygen + Sphinx (rocm_docs)"
8698
VERBATIM

docs/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ directory:
5757
└── html
5858
```
5959

60-
To generate a pdf, navigate to doxygen/latex and run `make pdf` to
60+
To generate a pdf for the API docs, navigate to `doxygen/latex` and run `make pdf` to
6161
generate a pdf named `refman.pdf`.
6262

63+
To generate a pdf for the Sphinx docs, navigate to `sphinx/html` and run `make` in
64+
the directory. This will generate a pdf named `rocshmem.pdf` (we are stealing their
65+
configs until `rocm-docs-core` is updated).
66+
6367
## Adding to the Documentation
6468

6569
### API Documentation (Doxygen)

0 commit comments

Comments
 (0)