Ver Fonte

Merge topic 'doc-xref-envvar'

828e18bb3e cmRST: Add support for 'envvar' cmake domain role

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2038
Brad King há 7 anos atrás
pai
commit
5e5ef61ed3
3 ficheiros alterados com 5 adições e 1 exclusões
  1. 1 1
      Source/cmRST.cxx
  2. 2 0
      Tests/CMakeLib/testRST.expect
  3. 2 0
      Tests/CMakeLib/testRST.rst

+ 1 - 1
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"

+ 2 - 0
Tests/CMakeLib/testRST.expect

@@ -16,6 +16,8 @@ Variable ``<PLACEHOLDER>_VARIABLE`` with leading placeholder.
 Variable ``VARIABLE_<PLACEHOLDER>`` with trailing placeholder.
 Variable ``<PLACEHOLDER>_VARIABLE`` with leading placeholder and target.
 Variable ``VARIABLE_<PLACEHOLDER>`` 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.

+ 2 - 0
Tests/CMakeLib/testRST.rst

@@ -23,6 +23,8 @@ Variable :variable:`<PLACEHOLDER>_VARIABLE` with leading placeholder.
 Variable :variable:`VARIABLE_<PLACEHOLDER>` with trailing placeholder.
 Variable :variable:`<PLACEHOLDER>_VARIABLE <target>` with leading placeholder and target.
 Variable :variable:`VARIABLE_<PLACEHOLDER> <target>` with trailing placeholder and target.
+Environment variable :envvar:`SOME_ENV_VAR`.
+Environment variable :envvar:`some env var <SOME_ENV_VAR>` with space and target.
 Generator :generator:`Some Generator` with space.
 
 .. |not replaced| replace:: not replaced through toctree