summaryrefslogtreecommitdiffstats
path: root/Help/variable/ENV.rst
diff options
context:
space:
mode:
authorJoachim Wuttke (l) <j.wuttke@fz-juelich.de>2018-11-01 10:18:15 (GMT)
committerJoachim Wuttke (h) <j.wuttke@fz-juelich.de>2018-11-08 19:33:13 (GMT)
commit860338491ee96274ac110459b3b316149d4585f7 (patch)
treeb754fa362154500439dd8e93e16147cf60d41347 /Help/variable/ENV.rst
parente855bd5248bbb7b77b45e269e4fa098b29c9e889 (diff)
downloadCMake-860338491ee96274ac110459b3b316149d4585f7.zip
CMake-860338491ee96274ac110459b3b316149d4585f7.tar.gz
CMake-860338491ee96274ac110459b3b316149d4585f7.tar.bz2
Help: Describe $CACHE and $ENV as operators
This resolves issue #18514 Also add a cross-reference to if(DEFINED ENV{var}).
Diffstat (limited to 'Help/variable/ENV.rst')
-rw-r--r--Help/variable/ENV.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Help/variable/ENV.rst b/Help/variable/ENV.rst
index 98677dd..2b43934 100644
--- a/Help/variable/ENV.rst
+++ b/Help/variable/ENV.rst
@@ -1,8 +1,12 @@
ENV
---
-Read environment variables.
+Operator to read environment variables.
Use the syntax ``$ENV{VAR}`` to read environment variable ``VAR``.
-See the :command:`set` command to see how to write environment variables.
+To test whether an environment variable is defined, use the signature
+``if(DEFINED ENV{<name>})`` of the :command:`if` command.
+
+See the :command:`set` and :command:`unset` commands to see how to
+write or remove environment variables.