[cmake-developers] [CMake 0015987]: STATUS variable to FILE(DOWNLOAD) does not consider HASH mismatch failures
Mantis Bug Tracker
mantis at public.kitware.com
Thu Feb 25 09:06:10 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15987
======================================================================
Reported By: Tobias Hieta
Assigned To:
======================================================================
Project: CMake
Issue ID: 15987
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-02-25 09:06 EST
Last Modified: 2016-02-25 09:06 EST
======================================================================
Summary: STATUS variable to FILE(DOWNLOAD) does not consider
HASH mismatch failures
Description:
This threw me for a bit of a loop when working with our cmake lists that
download dependencies. It seems like the STATUS variable to file(download) only
records errors if they happen when downloading the file. If the has mismatches
the STATUS variable will still be set to 0 and "No error" as the error string.
The only thing that does happen is that it prints a error message.
This makes it very hard to handle errors where the HASH is not correct since you
can't use the status variable to abort the the processing like:
file(DOWNLOAD <url> STATUS DL_STATUS)
if(NOT DL_STATUS EQUAL 0)
message(FATAL_ERROR "Failed")
endif()
I would expect the STATUS variable to be set to "1;HASH MISMATCH" or something
when the has mismatches.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-02-25 09:06 Tobias Hieta New Issue
======================================================================
More information about the cmake-developers
mailing list