diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-03-14 19:20:47 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-03-14 19:20:47 (GMT) |
commit | 302f5171d8bc9877fc1e9b34024d5c0322f53a69 (patch) | |
tree | ae93ba361561e44f27071d3e4dbd13a074e96629 /Help | |
parent | bc77ddb90ce7fd29c6100dbf352c9b3c8ed287f0 (diff) | |
download | CMake-302f5171d8bc9877fc1e9b34024d5c0322f53a69.zip CMake-302f5171d8bc9877fc1e9b34024d5c0322f53a69.tar.gz CMake-302f5171d8bc9877fc1e9b34024d5c0322f53a69.tar.bz2 |
Utilities/Sphinx: Add 'cref' role
Add a role that can be used to create local links (a la '`LINK`_'), but
that also applies literal style. This is particularly useful for
referring to subcommands within the command's documentation in a style
that is consistent with ':command:`BAR <foo(BAR)>`' but is much less
verbose.
Although this is intended for subcommands, it works with any local
reference.
Co-authored-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Help')
-rw-r--r-- | Help/dev/documentation.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Help/dev/documentation.rst b/Help/dev/documentation.rst index b7a77c9..c6fb7a6 100644 --- a/Help/dev/documentation.rst +++ b/Help/dev/documentation.rst @@ -395,6 +395,10 @@ object names like ``OUTPUT_NAME_<CONFIG>``. The form ``a <b>``, with a space preceding ``<``, is still interpreted as a link text with an explicit target. +Additionally, the ``cref`` role may be used to create references +to local targets that have literal styling. This is especially +useful for referencing a subcommand in the command's documentation. + .. _`list()`: https://cmake.org/cmake/help/latest/command/list.html .. _`list(APPEND)`: https://cmake.org/cmake/help/latest/command/list.html .. _`list(APPEND) sub-command`: https://cmake.org/cmake/help/latest/command/list.html |