[Cmake-commits] [cmake-commits] david.cole committed ExternalProject.cmake 1.13 1.14
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Dec 11 15:04:57 EST 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv24258/Modules
Modified Files:
ExternalProject.cmake
Log Message:
Fix issue #9764 - add TIMEOUT arg to ExternalProject_Add so that callers have explicit control over the amount of time they are willing to wait for a download step. Default to no timeout, which means just run download for however long it takes.
Index: ExternalProject.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/ExternalProject.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** ExternalProject.cmake 30 Sep 2009 20:22:36 -0000 1.13
--- ExternalProject.cmake 11 Dec 2009 20:04:55 -0000 1.14
***************
*** 18,21 ****
--- 18,22 ----
# [SVN_REVISION rev] # Revision to checkout from Subversion repo
# [URL /.../src.tgz] # Full path or URL of source
+ # [TIMEOUT seconds] # Time allowed for file download operations
# #--Update/Patch step----------
# [UPDATE_COMMAND cmd...] # Source work-tree update command
***************
*** 204,209 ****
function(_ep_write_downloadfile_script script_filename remote local timeout)
! if(NOT timeout)
! set(timeout 30)
endif()
--- 205,214 ----
function(_ep_write_downloadfile_script script_filename remote local timeout)
! if(timeout)
! set(timeout_args TIMEOUT ${timeout})
! set(timeout_msg "${timeout} seconds")
! else()
! set(timeout_args "# no TIMEOUT")
! set(timeout_msg "none")
endif()
***************
*** 211,220 ****
"message(STATUS \"downloading...
src='${remote}'
! dst='${local}'\")
file(DOWNLOAD
\"${remote}\"
\"${local}\"
! TIMEOUT ${timeout}
STATUS status
LOG log)
--- 216,226 ----
"message(STATUS \"downloading...
src='${remote}'
! dst='${local}'
! timeout='${timeout_msg}'\")
file(DOWNLOAD
\"${remote}\"
\"${local}\"
! ${timeout_args}
STATUS status
LOG log)
***************
*** 695,699 ****
endif()
set(file ${download_dir}/${fname})
! _ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "")
set(cmd ${CMAKE_COMMAND} -P ${stamp_dir}/download-${name}.cmake
COMMAND)
--- 701,706 ----
endif()
set(file ${download_dir}/${fname})
! get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
! _ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "${timeout}")
set(cmd ${CMAKE_COMMAND} -P ${stamp_dir}/download-${name}.cmake
COMMAND)
More information about the Cmake-commits
mailing list