summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2023-03-14 19:20:47 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2023-03-14 19:20:47 (GMT)
commit302f5171d8bc9877fc1e9b34024d5c0322f53a69 (patch)
treeae93ba361561e44f27071d3e4dbd13a074e96629 /Source
parentbc77ddb90ce7fd29c6100dbf352c9b3c8ed287f0 (diff)
downloadCMake-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 'Source')
-rw-r--r--Source/cmRST.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 5ff7009..f48330d 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -33,6 +33,7 @@ cmRST::cmRST(std::ostream& os, std::string docroot)
, VersionDirective("^.. version(added|changed)::[ \t]*(.*)$")
, ModuleRST(R"(^#\[(=*)\[\.rst:$)")
, CMakeRole("(:cmake)?:("
+ "cref|"
"command|cpack_gen|generator|genex|"
"variable|envvar|module|policy|"
"prop_cache|prop_dir|prop_gbl|prop_inst|prop_sf|"