diff options
author | Brad King <brad.king@kitware.com> | 2016-02-26 15:31:24 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-02-26 15:31:24 (GMT) |
commit | cc7a1b194152a171725ae9cb66c6de1e710b4ecb (patch) | |
tree | 668bb2c3444950709dd3d52d8248b6ff4840a4af /Source | |
parent | 9f7a2328acac8fa52e4b46535c69611041571de0 (diff) | |
parent | 6c9586f9c7804c4560a43aa6a03e490374174550 (diff) | |
download | CMake-cc7a1b194152a171725ae9cb66c6de1e710b4ecb.zip CMake-cc7a1b194152a171725ae9cb66c6de1e710b4ecb.tar.gz CMake-cc7a1b194152a171725ae9cb66c6de1e710b4ecb.tar.bz2 |
Merge topic 'file-download-status-hash-mismatch'
6c9586f9 file(DOWNLOAD): Fill STATUS variable on hash mismatch (#15987)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b3557f9..1fa27eb 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3300,6 +3300,15 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) << " status: [" << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"]" << std::endl ; + + if(!statusVar.empty() && res == 0) + { + std::string status = "1;HASH mismatch: " + "expected: " + expectedHash + + " actual: " + actualHash; + this->Makefile->AddDefinition(statusVar, status.c_str()); + } + this->SetError(oss.str()); return false; } |