cmRST: Add support for 'envvar' directive

This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19,
v3.12.0-rc1~200^2~1).
This commit is contained in:
Brad King
2021-01-15 21:55:51 -05:00
parent 8a132eca8a
commit 621ba5e1f2
3 changed files with 17 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ cmRST::cmRST(std::ostream& os, std::string docroot)
, Markup(MarkupNone)
, Directive(DirectiveNone)
, CMakeDirective("^.. (cmake:)?("
"command|variable"
"command|envvar|variable"
")::[ \t]+([^ \t\n]+)$")
, CMakeModuleDirective("^.. cmake-module::[ \t]+([^ \t\n]+)$")
, ParsedLiteralDirective("^.. parsed-literal::[ \t]*(.*)$")

View File

@@ -48,6 +48,14 @@ Bracket Comment Content
Command other_cmd description.
.. cmake:envvar:: some_var
Environment variable some_var description.
.. envvar:: other_var
Environment variable other_var description.
.. cmake:variable:: some_var
Variable some_var description.

View File

@@ -51,6 +51,14 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Command other_cmd description.
.. cmake:envvar:: some_var
Environment variable some_var description.
.. envvar:: other_var
Environment variable other_var description.
.. cmake:variable:: some_var
Variable some_var description.