comparison Resources/CMake/DownloadPackage.cmake @ 2153:47daf8022808

added download timeout for os x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Nov 2016 12:16:44 +0100
parents 72cb107a7346
children 5d8e6fab98dd
comparison
equal deleted inserted replaced
2152:cbebc5d072b0 2153:47daf8022808
74 # https://code.google.com/p/orthanc/issues/detail?id=6 74 # https://code.google.com/p/orthanc/issues/detail?id=6
75 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS) 75 if (NOT STATIC_BUILD AND NOT ALLOW_DOWNLOADS)
76 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON") 76 message(FATAL_ERROR "CMake is not allowed to download from Internet. Please set the ALLOW_DOWNLOADS option to ON")
77 endif() 77 endif()
78 78
79 file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS EXPECTED_MD5 "${MD5}") 79 file(DOWNLOAD "${Url}" "${TMP_PATH}"
80 SHOW_PROGRESS EXPECTED_MD5 "${MD5}"
81 TIMEOUT 5 INACTIVITY_TIMEOUT 5)
80 else() 82 else()
81 message("Using local copy of ${Url}") 83 message("Using local copy of ${Url}")
82 endif() 84 endif()
83 85
84 GetUrlExtension(TMP_EXTENSION "${Url}") 86 GetUrlExtension(TMP_EXTENSION "${Url}")