Repository navigation
Make the documentation build without CMake - #258
Merged
Merged
Conversation
docs/conf.py and the Doxygen configuration were templates that CMake filled in with configure_file(): the version, the Doxygen output directory, and Breathe's XML path. Run on their own, as Read the Docs runs them for rocm-systems projects, they didn't work. Both now work as committed, and the CMake build only sends their output to the build tree. - docs/Doxyfile.in is now docs/doxygen/Doxyfile, with paths relative to docs/doxygen. Running doxygen there writes the XML to docs/doxygen/xml/, which .gitignore ignores. STRIP_FROM_PATH = ../.. keeps the XML's file names relative to the repository root (include/hipobj.h). PROJECT_NUMBER is gone, since nothing that Breathe renders uses it. - docs/conf.py reads the version from the top-level CMakeLists.txt, and looks for the XML in doxygen/xml by default. - HIPOBJDocumentation.cmake writes a Doxyfile in the build tree that @includes the committed one and changes only OUTPUT_DIRECTORY, and runs doxygen in docs/doxygen. It runs Sphinx on docs/ directly, and passes the XML's location in the build tree with -D breathe_projects.hipobj=..., so it no longer copies conf.py into the build tree. - The documentation's Python requirements moved from the top-level requirements.txt to docs/sphinx/requirements.txt, where ROCm projects keep them. The requirements.txt entries in the workflows' path filters are gone, since docs/** covers the new location, and the documentation check and deploy workflows also run when the top-level CMakeLists.txt changes, since conf.py reads the version from it. docs/building.rst describes the virtual environment and the build without CMake, AGENTS.md says to keep CMake substitutions out of both files, and CHANGELOG.md has an entry for the moves. Testing: built the documentation before and after the change with a docs-only CMake configuration. The Doxygen XML is the same apart from its record of the configuration, and the HTML from clean builds is identical apart from Sphinx's .buildinfo file. Running doxygen in docs/doxygen and then sphinx-build -W on docs, without CMake, produces the same HTML. black, pylint, vermin, cmakelint, actionlint, doc8, and codespell are clean. Co-authored-by: Claude <noreply@anthropic.com>
derobins
requested review from
akolliasAMD,
gaoikawa,
jordan-turbofish,
kurtmcmillan,
riley-dixon,
sbates130272 and
zbyrne
as code owners
October 19, 2026 00:34
Contributor
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The configuration, path, and workflow changes are consistent, with no unresolved blocking findings.
No open issues 🎉
What changed in this PR
Makes hipObject’s documentation build without CMake, supporting the planned rocm-systems integration while preserving CMake builds.
Changes:
- Makes Doxygen and Sphinx configurations directly usable.
- Relocates Python requirements and updates workflow filters.
- Documents standalone builds and ignores generated XML.
| File | Description |
|---|---|
| docs/sphinx/requirements.txt | Relocates documentation dependencies. |
| docs/doxygen/Doxyfile | Provides standalone Doxygen configuration. |
| docs/conf.py | Reads the version and defaults to local XML. |
| docs/building.rst | Documents standalone builds and virtual environments. |
| cmake/HIPOBJDocumentation.cmake | Redirects documentation output without configuring source files. |
| CHANGELOG.md | Records configuration moves and standalone support. |
| AGENTS.md | Updates documentation-build guidance. |
| .gitignore | Ignores generated Doxygen XML. |
| .github/workflows/hipobject-iwyu.yml | Removes the obsolete requirements exclusion. |
| .github/workflows/hipobject-documentation-deploy.yml | Deploys documentation after version-source changes. |
| .github/workflows/hipobject-documentation-check.yml | Checks documentation after version-source changes. |
| .github/workflows/hipobject-clang-tidy.yml | Removes the obsolete requirements exclusion. |
| .github/workflows/hipobject-build.yml | Removes the obsolete requirements exclusion. |
| .github/workflows/codeql.yml | Removes the obsolete requirements exclusion. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/conf.py and the Doxygen configuration were templates that CMake filled in with configure_file(): the version, the Doxygen output directory, and Breathe's XML path. Run on their own, as Read the Docs runs them for rocm-systems projects, they didn't work. Both now work as committed, and the CMake build only sends their output to the build tree.
docs/building.rst describes the virtual environment and the build without CMake, AGENTS.md says to keep CMake substitutions out of both files, and CHANGELOG.md has an entry for the moves.
Testing: built the documentation before and after the change with a docs-only CMake configuration. The Doxygen XML is the same apart from its record of the configuration, and the HTML from clean builds is identical apart from Sphinx's .buildinfo file. Running doxygen in docs/doxygen and then sphinx-build -W on docs, without CMake, produces the same HTML. black, pylint, vermin, cmakelint, actionlint, doc8, and codespell are clean.