Commit 8a56e311 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'file-download-unexpected-arg'

4dd997da file(DOWNLOAD|UPLOAD): Warn on unexpected arguments
parents 1ba87fd1 4dd997da
......@@ -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;
......
^CMake Warning \(dev\) at DOWNLOAD-unused-argument.cmake:[0-9]+ \(file\):
Unexpected argument: JUNK
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$
file(DOWNLOAD
"file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt"
"${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
JUNK
)
include(RunCMake)
run_cmake(DOWNLOAD-hash-mismatch)
run_cmake(DOWNLOAD-unused-argument)
run_cmake(UPLOAD-unused-argument)
run_cmake(INSTALL-DIRECTORY)
run_cmake(INSTALL-MESSAGE-bad)
run_cmake(FileOpenFailRead)
......
^CMake Warning \(dev\) at UPLOAD-unused-argument.cmake:[0-9]+ \(file\):
Unexpected argument: JUNK
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$
file(UPLOAD
"${CMAKE_CURRENT_SOURCE_DIR}/UPLOAD-unused-argument.txt"
"file://${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
JUNK
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment