summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2016-09-09 20:19:39 (GMT)
committerRuslan Baratov <ruslan_baratov@yahoo.com>2016-09-09 20:19:39 (GMT)
commit4dd997da541be93b0cfacdd8483eaec8dd2a76d5 (patch)
tree6e906990cdac22724553fbe4a9cf5e0be8961684 /Source
parentd5e4cdc0f8c846cdf17f3276d77d352a7644bc88 (diff)
downloadCMake-4dd997da541be93b0cfacdd8483eaec8dd2a76d5.zip
CMake-4dd997da541be93b0cfacdd8483eaec8dd2a76d5.tar.gz
CMake-4dd997da541be93b0cfacdd8483eaec8dd2a76d5.tar.bz2
file(DOWNLOAD|UPLOAD): Warn on unexpected arguments
Emit warning message on unparsed argument instead of silently ignoring it. Can't stop with the error message because it may break old code.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileCommand.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 835b118..ae7a511 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2564,6 +2564,11 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
return false;
}
hashMatchMSG = algo + " hash";
+ } else {
+ // Do not return error for compatibility reason.
+ std::string err = "Unexpected argument: ";
+ err += *i;
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str());
}
++i;
}
@@ -2812,6 +2817,11 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
statusVar = *i;
} else if (*i == "SHOW_PROGRESS") {
showProgress = true;
+ } else {
+ // Do not return error for compatibility reason.
+ std::string err = "Unexpected argument: ";
+ err += *i;
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str());
}
++i;