diff options
author | Taylor Holberton <taylorcholberton@gmail.com> | 2019-02-01 00:26:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-01 11:10:34 (GMT) |
commit | cb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3 (patch) | |
tree | 0c56204b6befc2f9ce85c397d7410bc5f5ccb994 /Source/cmSetCommand.cxx | |
parent | d526327079e23748dd2a87acd4d9b4b1174725bf (diff) | |
download | CMake-cb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3.zip CMake-cb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3.tar.gz CMake-cb01b8c8ba1754b40e74d89d2c6dfef5dc8c44d3.tar.bz2 |
set: warn of extra arguments after ENV value.
Fixes: #18842
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 8 |
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; } |