Cross-references to CMake docs when using sphinxcontrib_moderncmakedomain in an outside project
I've been trying to use https://pypi.org/project/sphinxcontrib-moderncmakedomain/ to document my own CMake code with Sphinx 3.3.1 and running into issues trying to link to official CMake documentation for commands, etc.. Referring to one of my own definitions via (e.g.) :cmake:command:`my_cmake_func`
works just fine, rendering my_cmake_func()
and linking to the documentation therefor as one would expect. Unfortunately, the following does not work: :cmake:command:`project`
. It renders project()
as one would expect, but there is no link to the external URL. Even explicitly using the intersphinx
mapping name, such as :cmake:command:`cmake.org:project`
doesn't produce the hoped-for result.
Am I doing something wrong, or is this some limitation of the way CMakeXRefTransform()
is implemented in cmake.py
? If the latter, can this be remedied?