summaryrefslogtreecommitdiffstats
path: root/Source
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 /Source
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 'Source')
-rw-r--r--Source/cmSetCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index b09e3ca..6bd071c 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -38,6 +38,14 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
putEnvArg += args[1];
cmSystemTools::PutEnv(putEnvArg);
}
+ // if there's extra arguments, warn user
+ // that they are ignored by this command.
+ if (args.size() > 2) {
+ std::string m = "Only the first value argument is used when setting "
+ "an environment variable. Argument '" +
+ args[2] + "' and later are unused.";
+ this->Makefile->IssueMessage(MessageType::AUTHOR_WARNING, m);
+ }
return true;
}