Commit bf0d02de authored by jcfr's avatar jcfr
Browse files

COMP: Superbuild - Change macro downloadFile into function - Check also if downloaded file exists

git-svn-id: 3bd1e089-480b-0410-8dfb-8563597acbee
parent 8002241d
......@@ -53,14 +53,14 @@ set(CMAKE_MODULE_PATH
# Convenient macro allowing to download a file
MACRO(downloadFile url dest)
FUNCTION(downloadFile url dest)
FILE(DOWNLOAD ${url} ${dest} STATUS status)
LIST(GET status 0 error_code)
LIST(GET status 1 error_msg)
MESSAGE(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
IF(error_code OR NOT EXISTS ${dest})
MESSAGE(FATAL_ERROR "error: Failed to download ${url}")
# Prerequisites
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