From 0fb0191f3cb9ba4ea0f0e0675f929e1e599e1461 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:52:02 -0700 Subject: [PATCH] [ports.cmake] Use vcpkg_download_distfile() --- scripts/ports.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 8b4d17d803..ef06a4d653 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -108,10 +108,12 @@ elseif(CMD MATCHES "^CREATE$") message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") else() include(vcpkg_download_distfile) - file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code) - if(NOT error_code MATCHES "0;") - message(FATAL_ERROR "Error downloading file: ${error_code}") - endif() + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${FILENAME} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512)