From 621ba5e1f217aabb401d1401117ee2a3652fcc5d Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 15 Jan 2021 21:55:51 -0500 Subject: 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). --- Source/cmRST.cxx | 2 +- Tests/CMakeLib/testRST.expect | 8 ++++++++ Tests/CMakeLib/testRST.rst | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 26e93bb..686455e 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -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]*(.*)$") diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 970adaa..64f0896 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -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. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index 6462f1b..4c77595 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -51,6 +51,14 @@ Inline literal ``__`` followed by inline link `Link Text `_. 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. -- cgit v0.12