Skip to content

Make the documentation build without CMake - #258

Merged
derobins merged 1 commit into
developfrom
derobins/docs_cleanup
Oct 19, 2026
Merged

derobins merged 1 commit into
developfrom
derobins/docs_cleanup

Conversation

@derobins

Copy link
Copy Markdown
Collaborator

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.

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>
@github-actions

Copy link
Copy Markdown
Contributor
Security scan found no critical or high findings on lines changed by this pull request

View 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@derobins
derobins merged commit 7cd0b1f into develop Oct 19, 2026
36 checks passed
@derobins
derobins deleted the derobins/docs_cleanup branch October 19, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants