Merge topic 'document-dollar-in-varnames'

82a4822610 CMP0053: document that `$` is a valid literal variable character

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2479
This commit is contained in:
Brad King
2018-10-16 15:04:01 +00:00
committed by Kitware Robot
8 changed files with 48 additions and 2 deletions
+3 -2
View File
@@ -391,8 +391,9 @@ inside out, e.g. ``${outer_${inner_variable}_variable}``.
Literal variable references may consist of alphanumeric characters,
the characters ``/_.+-``, and `Escape Sequences`_. Nested references
may be used to evaluate variables of any name. (See also policy
:policy:`CMP0053` documentation for historical considerations.)
may be used to evaluate variables of any name. See also policy
:policy:`CMP0053` documentation for historical considerations and reasons why
the ``$`` is also technically permitted but is discouraged.
The `Variables`_ section documents the scope of variable names
and how their values are set.
+4
View File
@@ -16,6 +16,10 @@ cleaned up to simplify the behavior. Specifically:
* Literal ``${VAR}`` reference syntax may contain only
alphanumeric characters (``A-Z``, ``a-z``, ``0-9``) and
the characters ``_``, ``.``, ``/``, ``-``, and ``+``.
Note that ``$`` is technically allowed in the ``NEW`` behavior, but is
invalid for ``OLD`` behavior. This is due to an oversight during the
implementation of :policy:`CMP0053` and its use as a literal variable
reference is discouraged for this reason.
Variables with other characters in their name may still
be referenced indirectly, e.g.