mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
cmake: Make Download.cmake check for errors
Copying from third-party/cmake/DownloadAndExtractFile.cmake.
This commit is contained in:
@@ -1 +1,16 @@
|
||||
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()
|
||||
|
Reference in New Issue
Block a user