mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions:
:genex:`SOME_GENEX`
:genex:`$<SOME_GENEX>`
:genex:`$<SOME_GENEX:...>`
and definition of CMake generator expressions via a directive:
.. genex:: SOME_GENEX
.. genex:: $<SOME_GENEX>
.. genex:: $<SOME_GENEX:...>
It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
This commit is contained in:
+3
-2
@@ -25,7 +25,7 @@ cmRST::cmRST(std::ostream& os, std::string docroot)
|
||||
, Markup(MarkupNone)
|
||||
, Directive(DirectiveNone)
|
||||
, CMakeDirective("^.. (cmake:)?("
|
||||
"command|envvar|variable"
|
||||
"command|envvar|genex|variable"
|
||||
")::[ \t]+([^ \t\n]+)$")
|
||||
, CMakeModuleDirective("^.. cmake-module::[ \t]+([^ \t\n]+)$")
|
||||
, ParsedLiteralDirective("^.. parsed-literal::[ \t]*(.*)$")
|
||||
@@ -37,7 +37,8 @@ cmRST::cmRST(std::ostream& os, std::string docroot)
|
||||
, NoteDirective("^.. note::[ \t]*(.*)$")
|
||||
, ModuleRST(R"(^#\[(=*)\[\.rst:$)")
|
||||
, CMakeRole("(:cmake)?:("
|
||||
"command|cpack_gen|generator|variable|envvar|module|policy|"
|
||||
"command|cpack_gen|generator|genex|"
|
||||
"variable|envvar|module|policy|"
|
||||
"prop_cache|prop_dir|prop_gbl|prop_inst|prop_sf|"
|
||||
"prop_test|prop_tgt|"
|
||||
"manual"
|
||||
|
||||
Reference in New Issue
Block a user