* Add wget retry
Make CMake download more tolerant to network issues
* Sync log message
Download(${from} ${to} ${fatal} ${result} output)
list(GET output 0 status_code)
else()
- message(STATUS "${WGET_EXECUTABLE} --no-cache ${from}")
- execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate" "${from}" "-O" "${to}"
+ message(STATUS "${WGET_EXECUTABLE} --no-cache --no-check-certificate
+ --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=5 ${from}")
+ execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate"
+ "--retry-connrefused" "--waitretry=1" "--read-timeout=20" "--timeout=15" "--tries=5"
+ "${from}" "-O" "${to}"
TIMEOUT 2000
RESULT_VARIABLE status_code)
endif()