diff options
author | Brad King <brad.king@kitware.com> | 2019-02-04 12:46:21 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-04 07:46:29 -0500 |
commit | dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa (patch) | |
tree | 505cfd07eff76667002f775aa9eec8d72253455f /Tests | |
parent | d401c10db5cc5afc009bbb31c4ea11e4914687db (diff) | |
parent | cb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3 (diff) | |
download | cmake-dc4a2749a52cb7f96ad8d7146ee4d680a2beb5fa.tar.gz |
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 'Tests')
-rw-r--r-- | Tests/RunCMake/set/ExtraEnvValue-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/set/ExtraEnvValue.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/set/RunCMakeTest.cmake | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/set/ExtraEnvValue-stderr.txt b/Tests/RunCMake/set/ExtraEnvValue-stderr.txt new file mode 100644 index 0000000000..f61f9d287b --- /dev/null +++ b/Tests/RunCMake/set/ExtraEnvValue-stderr.txt @@ -0,0 +1,6 @@ +CMake Warning \(dev\) at ExtraEnvValue.cmake:1 \(set\): + Only the first value argument is used when setting an environment variable. + Argument 'value_2' and later are unused. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/set/ExtraEnvValue.cmake b/Tests/RunCMake/set/ExtraEnvValue.cmake new file mode 100644 index 0000000000..768a6eac2e --- /dev/null +++ b/Tests/RunCMake/set/ExtraEnvValue.cmake @@ -0,0 +1 @@ +set (ENV{sample_key} value_1 value_2) diff --git a/Tests/RunCMake/set/RunCMakeTest.cmake b/Tests/RunCMake/set/RunCMakeTest.cmake index ea63d0bdc4..b3bd0a4807 100644 --- a/Tests/RunCMake/set/RunCMakeTest.cmake +++ b/Tests/RunCMake/set/RunCMakeTest.cmake @@ -4,3 +4,4 @@ run_cmake(ParentScope) run_cmake(ParentPulling) run_cmake(ParentPullingRecursive) run_cmake(UnknownCacheType) +run_cmake(ExtraEnvValue) |