diff options
author | Brad King <brad.king@kitware.com> | 2019-01-30 13:13:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-30 13:13:42 (GMT) |
commit | 748d024551d8f447046363ad617fc72bdd977fd2 (patch) | |
tree | 5961790a6b2851fd0d0780fd0ee6fce25ba649a9 /Utilities | |
parent | d685a46f56b6f7ccf5763b87611bf383e3aa8cb7 (diff) | |
parent | a94355c7b781378f73b70010ee97f9d5d6209e68 (diff) | |
download | CMake-748d024551d8f447046363ad617fc72bdd977fd2.zip CMake-748d024551d8f447046363ad617fc72bdd977fd2.tar.gz CMake-748d024551d8f447046363ad617fc72bdd977fd2.tar.bz2 |
Merge topic 'fetchcontent-reduce-boilerplate'
a94355c7b7 FetchContent: Add new command FetchContent_MakeAvailable()
611d5274de Sphinx: Add limited support for nested variables in docs
1a07e1b47d FetchContent: Trivial doc corrections
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2830
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Sphinx/cmake.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py index 882cdc1..d903dbe 100644 --- a/Utilities/Sphinx/cmake.py +++ b/Utilities/Sphinx/cmake.py @@ -21,6 +21,8 @@ from pygments.lexer import bygroups # - Unix paths are recognized by '/'; support for Windows paths may be added if needed # - (\\.) allows for \-escapes (used in manual/cmake-language.7) # - $<..$<..$>..> nested occurence in cmake-buildsystem +# - Nested variable evaluations are only supported in a limited capacity. Only +# one level of nesting is supported and at most one nested variable can be present. CMakeLexer.tokens["root"] = [ (r'\b(\w+)([ \t]*)(\()', bygroups(Name.Function, Text, Name.Function), '#push'), # fctn( @@ -34,7 +36,8 @@ CMakeLexer.tokens["root"] = [ (r'[<>]=', Punctuation), # used in FindPkgConfig.cmake (r'\$<', Operator, '#push'), # $<...> (r'<[^<|]+?>(\w*\.\.\.)?', Name.Variable), # <expr> - (r'(\$\w*\{)(.+?)(\})', bygroups(Operator, Name.Tag, Operator)), # ${..} $ENV{..} + (r'(\$\w*\{)([^\}\$]*)?(?:(\$\w*\{)([^\}]+?)(\}))?([^\}]*?)(\})', # ${..} $ENV{..}, possibly nested + bygroups(Operator, Name.Tag, Operator, Name.Tag, Operator, Name.Tag, Operator)), (r'([A-Z]+\{)(.+?)(\})', bygroups(Operator, Name.Tag, Operator)), # DATA{ ...} (r'[a-z]+(@|(://))((\\.)|[\w.+-:/\\])+', Name.Attribute), # URL, git@, ... (r'/\w[\w\.\+-/\\]*', Name.Attribute), # absolute path |