message: ENH: Added retry for failed download on windows
diff: @@ -1003,15 +1003,18 @@ function(_ExternalData_download_object name hash algo var_obj)
  if(found)
  file(RENAME "${tmp}" "${obj}")
  + set(obj_downloaded 1 PARENT_SCOPE)
  message(STATUS "Downloaded object: \"${obj}\"")
  elseif(EXISTS "${staged}")
  set(obj "${staged}")
  + set(obj_downloaded 1 PARENT_SCOPE)
  message(STATUS "Staged object: \"${obj}\"")
  else()
  if(NOT tried)
  set(tried "\n (No ExternalData_URL_TEMPLATES given)")
  endif()
  - message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}")
  + set(obj_downloaded 0 PARENT_SCOPE)
  + #message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}")
  endif()
  set("${var_obj}" "${obj}" PARENT_SCOPE)
  @@ -1033,7 +1036,15 @@ if("${ExternalData_ACTION}" STREQUAL "fetch")
  message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
  endif()
  + set(obj_downloaded 0)
  + set(retry 3)
  + while(retry)
  + math(EXPR retry "${retry} - 1")
  _ExternalData_download_object("${name}" "${hash}" "${algo}" obj)
  + if(${obj_downloaded})
  + break()
  + endif()
  + endwhile()
  # Check if file already corresponds to the object.
  set(stamp "${ext}-stamp")
  