summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2016-05-19 11:48:49 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-19 15:01:12 (GMT)
commit33218f6a9373583d56a6ce73752f2365ac3779f5 (patch)
tree77b765eefcc81aabce69e03cd00bb851607dbcfd /Modules
parente5409d1e0f38c9869748cca6f6f0c089a3e40ee1 (diff)
downloadCMake-33218f6a9373583d56a6ce73752f2365ac3779f5.zip
CMake-33218f6a9373583d56a6ce73752f2365ac3779f5.tar.gz
CMake-33218f6a9373583d56a6ce73752f2365ac3779f5.tar.bz2
ExternalProject: Remove unused verify script logic
The logic to re-run the download script will be moved elsewhere.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake19
1 files changed, 2 insertions, 17 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index e97ecfc..1755643 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -935,30 +935,16 @@ message(STATUS \"downloading... done\")
endfunction()
-function(_ep_write_verifyfile_script script_filename LOCAL hash download_script)
- set(retries 0)
+function(_ep_write_verifyfile_script script_filename LOCAL hash)
if("${hash}" MATCHES "${_ep_hash_regex}")
set(algo "${CMAKE_MATCH_1}")
string(TOLOWER "${CMAKE_MATCH_2}" expect_value)
set(script_content "set(expect_value \"${expect_value}\")
-set(attempt 0)
set(succeeded 0)
-while(\${attempt} LESS ${retries} OR \${attempt} EQUAL ${retries} AND NOT \${succeeded})
file(${algo} \"\${file}\" actual_value)
if(\"\${actual_value}\" STREQUAL \"\${expect_value}\")
set(succeeded 1)
- elseif(\${attempt} LESS ${retries})
- message(STATUS \"${algo} hash of \${file}
-does not match expected value
- expected: \${expect_value}
- actual: \${actual_value}
-Retrying download.
-\")
- file(REMOVE \"\${file}\")
- execute_process(COMMAND \${CMAKE_COMMAND} -P \"${download_script}\")
endif()
- math(EXPR attempt \"\${attempt} + 1\")
-endwhile()
if(\${succeeded})
message(STATUS \"verifying file... done\")
@@ -1899,7 +1885,6 @@ function(_ep_add_download_command name)
set(repository "external project URL")
set(module "${url}")
set(tag "${hash}")
- set(download_script "")
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${stamp_dir}/${name}-urlinfo.txt"
@@ -1952,7 +1937,7 @@ function(_ep_add_download_command name)
endif ()
set(comment "Performing download step (${steps}) for '${name}'")
endif()
- _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${hash}" "${download_script}")
+ _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${hash}")
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake
COMMAND)
if (NOT no_extract)