From 828e18bb3eadaff9bbe8b1ddf57b68cf40e0eafb Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 3 May 2018 14:34:32 -0400 Subject: cmRST: Add support for 'envvar' cmake domain role This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19). --- Source/cmRST.cxx | 2 +- Tests/CMakeLib/testRST.expect | 2 ++ Tests/CMakeLib/testRST.rst | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 112be4d..edcbc22 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -34,7 +34,7 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot) , NoteDirective("^.. note::[ \t]*(.*)$") , ModuleRST("^#\\[(=*)\\[\\.rst:$") , CMakeRole("(:cmake)?:(" - "command|generator|variable|module|policy|" + "command|generator|variable|envvar|module|policy|" "prop_cache|prop_dir|prop_gbl|prop_inst|prop_sf|" "prop_test|prop_tgt|" "manual" diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index fa436cb..4b29762 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -16,6 +16,8 @@ Variable ``_VARIABLE`` with leading placeholder. Variable ``VARIABLE_`` with trailing placeholder. Variable ``_VARIABLE`` with leading placeholder and target. Variable ``VARIABLE_`` with trailing placeholder and target. +Environment variable ``SOME_ENV_VAR``. +Environment variable ``some env var`` with space and target. Generator ``Some Generator`` with space. First TOC entry. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index 54952dd..9cd7257 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -23,6 +23,8 @@ Variable :variable:`_VARIABLE` with leading placeholder. Variable :variable:`VARIABLE_` with trailing placeholder. Variable :variable:`_VARIABLE ` with leading placeholder and target. Variable :variable:`VARIABLE_ ` with trailing placeholder and target. +Environment variable :envvar:`SOME_ENV_VAR`. +Environment variable :envvar:`some env var ` with space and target. Generator :generator:`Some Generator` with space. .. |not replaced| replace:: not replaced through toctree -- cgit v0.12