Add wget retry (#2455)
* Add wget retry Make CMake download more tolerant to network issues * Sync log message
This commit is contained in:
parent
e4875f2a6b
commit
2d3d703445
@ -22,8 +22,11 @@ function (DownloadAndCheck from to fatal result)
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user