summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-20 13:22:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-20 13:22:26 (GMT)
commitdf136e6c27d7430662eb11f5acd386927ad5e993 (patch)
treed06a54d470931f3aa360cf8c88d95bd231eb0f72 /Modules
parentb048a3edd031f1674c912353c968087a9f059ea3 (diff)
parentf1b953ec9b71375b1ecb2bcb2eac5af0f2a895d3 (diff)
downloadCMake-df136e6c27d7430662eb11f5acd386927ad5e993.zip
CMake-df136e6c27d7430662eb11f5acd386927ad5e993.tar.gz
CMake-df136e6c27d7430662eb11f5acd386927ad5e993.tar.bz2
Merge topic 'ExternalProject-no-download-progress'
f1b953ec Help: Add notes for topic 'ExternalProject-no-download-progress' 7d35b550 ExternalProject: Add option to disable download progress (#14807)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake14
1 files changed, 11 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 1e83163..8235dda 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -20,6 +20,7 @@
# [DOWNLOAD_NAME fname] # File name to store (if not end of URL)
# [DOWNLOAD_DIR dir] # Directory to store downloaded files
# [DOWNLOAD_COMMAND cmd...] # Command to download source tree
+# [DOWNLOAD_NO_PROGRESS 1] # Disable download progress reports
# [CVS_REPOSITORY cvsroot] # CVSROOT of CVS repository
# [CVS_MODULE mod] # Module to checkout from CVS repo
# [CVS_TAG tag] # Tag to checkout from CVS repo
@@ -515,7 +516,7 @@ endif()
endfunction(_ep_write_gitupdate_script)
-function(_ep_write_downloadfile_script script_filename remote local timeout hash tls_verify tls_cainfo)
+function(_ep_write_downloadfile_script script_filename remote local timeout no_progress hash tls_verify tls_cainfo)
if(timeout)
set(timeout_args TIMEOUT ${timeout})
set(timeout_msg "${timeout} seconds")
@@ -524,6 +525,12 @@ function(_ep_write_downloadfile_script script_filename remote local timeout hash
set(timeout_msg "none")
endif()
+ if(no_progress)
+ set(show_progress "")
+ else()
+ set(show_progress "SHOW_PROGRESS")
+ endif()
+
if("${hash}" MATCHES "${_ep_hash_regex}")
set(hash_args EXPECTED_HASH ${CMAKE_MATCH_1}=${CMAKE_MATCH_2})
else()
@@ -563,7 +570,7 @@ ${tls_cainfo}
file(DOWNLOAD
\"${remote}\"
\"${local}\"
- SHOW_PROGRESS
+ ${show_progress}
${hash_args}
${timeout_args}
STATUS status
@@ -1443,10 +1450,11 @@ function(_ep_add_download_command name)
string(REPLACE ";" "-" fname "${fname}")
set(file ${download_dir}/${fname})
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
+ get_property(no_progress TARGET ${name} PROPERTY _EP_DOWNLOAD_NO_PROGRESS)
get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY)
get_property(tls_cainfo TARGET ${name} PROPERTY _EP_TLS_CAINFO)
set(download_script "${stamp_dir}/download-${name}.cmake")
- _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${hash}" "${tls_verify}" "${tls_cainfo}")
+ _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${no_progress}" "${hash}" "${tls_verify}" "${tls_cainfo}")
set(cmd ${CMAKE_COMMAND} -P "${download_script}"
COMMAND)
set(retries 3)