View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015987 | CMake | CMake | public | 2016-02-25 09:06 | 2016-06-10 14:21 | ||||
Reporter | Tobias Hieta | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 | ||||
Product Version | CMake 3.4.3 | ||||||||
Target Version | CMake 3.6 | Fixed in Version | CMake 3.6 | ||||||
Summary | 0015987: 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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | set_file_download_status_on_hash_mismatch.patch [^] (793 bytes) 2016-02-25 09:27 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0040550) Tobias Hieta (reporter) 2016-02-25 09:27 |
Uploaded a patch that makes it behave as I expect |
(0040552) Brad King (manager) 2016-02-25 11:45 |
Thanks. This should fix it: file(DOWNLOAD): Fill STATUS variable on hash mismatch https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c9586f9 [^] |
(0041242) Kitware Robot (administrator) 2016-06-10 14:21 |
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-02-25 09:06 | Tobias Hieta | New Issue | |
2016-02-25 09:27 | Tobias Hieta | File Added: set_file_download_status_on_hash_mismatch.patch | |
2016-02-25 09:27 | Tobias Hieta | Note Added: 0040550 | |
2016-02-25 11:45 | Brad King | Note Added: 0040552 | |
2016-02-25 11:45 | Brad King | Assigned To | => Brad King |
2016-02-25 11:45 | Brad King | Status | new => resolved |
2016-02-25 11:45 | Brad King | Resolution | open => fixed |
2016-02-25 11:45 | Brad King | Fixed in Version | => CMake 3.6 |
2016-02-25 11:45 | Brad King | Target Version | => CMake 3.6 |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041242 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |