summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-04 12:46:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-04 12:46:29 (GMT)
commitdc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa (patch)
tree505cfd07eff76667002f775aa9eec8d72253455f /Help
parentd401c10db5cc5afc009bbb31c4ea11e4914687db (diff)
parentcb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3 (diff)
downloadCMake-dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa.zip
CMake-dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa.tar.gz
CMake-dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa.tar.bz2
Merge topic 'set-env-warning'
cb01b8c8ba set: warn of extra arguments after ENV value. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2903
Diffstat (limited to 'Help')
-rw-r--r--Help/command/set.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Help/command/set.rst b/Help/command/set.rst
index dd5ea13..c0e02e2 100644
--- a/Help/command/set.rst
+++ b/Help/command/set.rst
@@ -86,7 +86,7 @@ Set Environment Variable
.. code-block:: cmake
- set(ENV{<variable>} <value>...)
+ set(ENV{<variable>} [<value>])
Sets an :manual:`Environment Variable <cmake-env-variables(7)>`
to the given value.
@@ -95,3 +95,10 @@ Subsequent calls of ``$ENV{<variable>}`` will return this new value.
This command affects only the current CMake process, not the process
from which CMake was called, nor the system environment at large,
nor the environment of subsequent build or test processes.
+
+If no argument is given after ``ENV{<variable>}`` or if ``<value>`` is
+an empty string, then this command will clear any existing value of the
+environment variable.
+
+Arguments after ``<value>`` are ignored. If extra arguments are found,
+then an author warning is issued.