blob: 59c87998e95e79bf678485b58a9da6304f246703 [file] [log] [blame]
macro(download_and_check source destination)
file(DOWNLOAD ${source} ${destination} STATUS download_status)
list(GET download_status 0 status_code)
list(GET download_status 1 status_message)
if(${status_code} EQUAL 0)
message(VERBOSE "Download of \"${source}\" successful.")
else()
message(FATAL_ERROR "Download of \"${source}\" failed: ${status_message}")
endif()
endmacro()