2014-04-12 08:42:37 -04:00
|
|
|
#
|
|
|
|
# CMake script to fetch kvasd binary for the current platform
|
|
|
|
#
|
2014-11-27 12:17:19 -05:00
|
|
|
set (kvasd_NAME ${URL}/${SYSTEM_NAME}/kvasd${EXECUTABLE_SUFFIX})
|
2014-04-12 08:42:37 -04:00
|
|
|
message (STATUS "file: ${kvasd_NAME}")
|
2014-11-27 12:17:19 -05:00
|
|
|
|
|
|
|
file (
|
|
|
|
DOWNLOAD ${kvasd_NAME}.md5 contrib/kvasd${EXECUTABLE_SUFFIX}.md5
|
|
|
|
TIMEOUT 120
|
|
|
|
STATUS status
|
|
|
|
LOG log
|
|
|
|
SHOW_PROGRESS
|
|
|
|
)
|
|
|
|
list (GET staus 0 rc)
|
|
|
|
if (rc)
|
|
|
|
message (WARNING "${status}")
|
|
|
|
message (FATAL_ERROR "${log}")
|
|
|
|
endif (rc)
|
|
|
|
file (READ contrib/kvasd${EXECUTABLE_SUFFIX}.md5 md5sum)
|
2014-12-16 12:19:38 -05:00
|
|
|
string (REGEX MATCH "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]" md5sum "${md5sum}")
|
2014-11-27 12:17:19 -05:00
|
|
|
|
2014-04-12 08:42:37 -04:00
|
|
|
file (
|
|
|
|
DOWNLOAD ${kvasd_NAME} contrib/kvasd${EXECUTABLE_SUFFIX}
|
2014-10-02 16:46:57 -04:00
|
|
|
TIMEOUT 120
|
2014-11-27 12:17:19 -05:00
|
|
|
STATUS status
|
|
|
|
LOG log
|
2014-04-12 08:42:37 -04:00
|
|
|
SHOW_PROGRESS
|
2014-12-16 12:19:38 -05:00
|
|
|
EXPECTED_MD5 "${md5sum}"
|
2014-04-12 08:42:37 -04:00
|
|
|
)
|
2014-11-27 12:17:19 -05:00
|
|
|
list (GET status 0 rc)
|
|
|
|
if (rc)
|
|
|
|
message (WARNING "${status}")
|
|
|
|
message (FATAL_ERROR "${log}")
|
|
|
|
endif (rc)
|