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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to