aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_from_github.cmake
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-01-05 16:48:59 -0800
committerGitHub <noreply@github.com>2018-01-05 16:48:59 -0800
commit2dab9a2576a4f2c03d65abc9ad2668d2f34c6ba5 (patch)
tree0c28bc3b280796ebc7cb7609794f6f9171788ab4 /scripts/cmake/vcpkg_from_github.cmake
parentcf802347a47279e43bb37592437f3632bcdc5374 (diff)
parent2b30280c222a6970fa74d05b6f7e106b4776318a (diff)
downloadvcpkg-2dab9a2576a4f2c03d65abc9ad2668d2f34c6ba5.tar.gz
vcpkg-2dab9a2576a4f2c03d65abc9ad2668d2f34c6ba5.zip
Merge pull request #2469 from Mixaill/fix_github_head
[vcpkg] fix --head flag for github-based ports
Diffstat (limited to 'scripts/cmake/vcpkg_from_github.cmake')
-rw-r--r--scripts/cmake/vcpkg_from_github.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake
index b71ab3838..c6a23cff6 100644
--- a/scripts/cmake/vcpkg_from_github.cmake
+++ b/scripts/cmake/vcpkg_from_github.cmake
@@ -137,17 +137,17 @@ 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
+ SKIP_SHA512
)
vcpkg_download_distfile(ARCHIVE
URLS ${URL}
FILENAME ${downloaded_file_name}
+ SKIP_SHA512
)
- set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE")
endif()
vcpkg_extract_source_archive_ex(
@@ -162,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()