Skip to content

Commit

Permalink
ExternalProject: Fix download retry logic
Browse files Browse the repository at this point in the history
Do not check file's hash in download script.  If hash will not match
command ``file(DOWNLOAD ...)`` will fail with FATAL_ERROR, ``cmake -P``
will exit with unsuccessful code, and the build will stop.  Leave hash
checking to the existing implementation in the verify step.
  • Loading branch information
ruslo authored and bradking committed Sep 15, 2014
1 parent 2770b19 commit 30a94ee
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Modules/ExternalProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,6 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
set(show_progress "SHOW_PROGRESS")
endif()

if("${hash}" MATCHES "${_ep_hash_regex}")
set(hash_args EXPECTED_HASH ${CMAKE_MATCH_1}=${CMAKE_MATCH_2})
else()
set(hash_args "# no EXPECTED_HASH")
endif()
# check for curl globals in the project
if(DEFINED CMAKE_TLS_VERIFY)
set(tls_verify "set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})")
Expand Down Expand Up @@ -668,7 +663,6 @@ file(DOWNLOAD
\"${remote}\"
\"${local}\"
${show_progress}
${hash_args}
${timeout_args}
STATUS status
LOG log)
Expand Down

0 comments on commit 30a94ee

Please sign in to comment.