Commit 8204eaea authored by ZyX's avatar ZyX

cmake: Make Download.cmake check for errors

Copying from third-party/cmake/DownloadAndExtractFile.cmake.
parent 0b528fc4
file(DOWNLOAD "${URL}" "${FILE}")
file(
DOWNLOAD "${URL}" "${FILE}"
STATUS status
LOG log
)
list(GET status 0 status_code)
list(GET status 1 status_string)
if(NOT status_code EQUAL 0)
message(FATAL_ERROR "error: downloading '${URL}' failed
status_code: ${status_code}
status_string: ${status_string}
log: ${log}
")
endif()
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