diff options
author | Joachim Wuttke (l) <j.wuttke@fz-juelich.de> | 2018-11-01 10:13:03 (GMT) |
---|---|---|
committer | Joachim Wuttke (h) <j.wuttke@fz-juelich.de> | 2018-11-08 19:27:49 (GMT) |
commit | 8ba2a8d4a415d2288786a0d56e90b3d7693ad32e (patch) | |
tree | 235884135ef9892c239e132ac96d709c04125b2a /Help/command/if.rst | |
parent | 85498fccd8ac1dd7345d995e52e1bf63d663071e (diff) | |
download | CMake-8ba2a8d4a415d2288786a0d56e90b3d7693ad32e.zip CMake-8ba2a8d4a415d2288786a0d56e90b3d7693ad32e.tar.gz CMake-8ba2a8d4a415d2288786a0d56e90b3d7693ad32e.tar.bz2 |
Help: short/long variable reference in if command
Explain that the short form of variable references
in the if command does not apply to ENV and CACHE vars.
Diffstat (limited to 'Help/command/if.rst')
-rw-r--r-- | Help/command/if.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Help/command/if.rst b/Help/command/if.rst index 4781f35..ea5de7f 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -231,7 +231,7 @@ which is true because ``var2`` is defined to "var1" which is not a false constant. Automatic evaluation applies in the other cases whenever the -above-documented signature accepts ``<variable|string>``: +above-documented condition syntax accepts ``<variable|string>``: * The left hand argument to ``MATCHES`` is first checked to see if it is a defined variable, if so the variable's value is used, otherwise the @@ -269,3 +269,7 @@ specified in a :ref:`Quoted Argument` or a :ref:`Bracket Argument`. A quoted or bracketed variable or keyword will be interpreted as a string and not dereferenced or interpreted. See policy :policy:`CMP0054`. + +There is no short form for environment or cache :ref:`Variable References`. +They can be referenced as ``$ENV{<name>}`` or ``$CACHE{<name>}`` +wherever the above-documented condition syntax accepts <variable|string>. |