aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_from_github.cmake
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-01-05 16:16:08 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-01-05 16:16:08 -0800
commit2b30280c222a6970fa74d05b6f7e106b4776318a (patch)
tree0c28bc3b280796ebc7cb7609794f6f9171788ab4 /scripts/cmake/vcpkg_from_github.cmake
parent42c0cfc8705c71c3c9dcc4df4804ab342dc89988 (diff)
downloadvcpkg-2b30280c222a6970fa74d05b6f7e106b4776318a.tar.gz
vcpkg-2b30280c222a6970fa74d05b6f7e106b4776318a.zip
[vcpkg-download-distfile] Regenerate docs and enable SKIP_SHA512 only in unstable (head) mode
Diffstat (limited to 'scripts/cmake/vcpkg_from_github.cmake')
-rw-r--r--scripts/cmake/vcpkg_from_github.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake
index 545be3b4d..c6a23cff6 100644
--- a/scripts/cmake/vcpkg_from_github.cmake
+++ b/scripts/cmake/vcpkg_from_github.cmake
@@ -137,7 +137,6 @@ function(vcpkg_from_github)
endif()
# Try to download the file and version information from github.
- set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE")
vcpkg_download_distfile(ARCHIVE_VERSION
URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}"
FILENAME ${downloaded_file_name}.version
@@ -149,7 +148,6 @@ function(vcpkg_from_github)
FILENAME ${downloaded_file_name}
SKIP_SHA512
)
- set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE")
endif()
vcpkg_extract_source_archive_ex(
@@ -164,7 +162,10 @@ function(vcpkg_from_github)
string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x})
# exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build.
- set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE)
+ # When multiple vcpkg_from_github's are used after each other, only use the version from the first (hopefully the primary one).
+ if(NOT DEFINED VCPKG_HEAD_VERSION)
+ set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE)
+ endif()
set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF})
endfunction()