diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-12-03 13:24:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-03 13:24:26 -0800 |
| commit | ef0c3036fcb540957c381b2a8d21448062ac23ae (patch) | |
| tree | 9e4a8965788d0b81085408f913342aed135f7631 /scripts/cmake | |
| parent | a2135fd97e834e83a705b1cff0d91a0e45a0fb00 (diff) | |
| download | vcpkg-ef0c3036fcb540957c381b2a8d21448062ac23ae.tar.gz vcpkg-ef0c3036fcb540957c381b2a8d21448062ac23ae.zip | |
[vcpkg baseline][vtk-m] fix the sha512 (#14884)
* [vtk-m] fix the sha512
* Bump version
* add FILE_DISAMBIGUATOR to vcpkg_from_gitlab
* actually use the file disambiguator
* regenerate docs
* [moos-core] Add DISABLE_PARALLEL_CONFIGURE
Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
Diffstat (limited to 'scripts/cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_from_github.cmake | 1 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_from_gitlab.cmake | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index f52538c8e..1c1b71679 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -14,6 +14,7 @@ vcpkg_from_github( [PATCHES <patch1.patch> <patch2.patch>...] [GITHUB_HOST <https://github.com>] [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] + [FILE_DISAMBIGUATOR <N>] ) ``` diff --git a/scripts/cmake/vcpkg_from_gitlab.cmake b/scripts/cmake/vcpkg_from_gitlab.cmake index 354ff85b9..865c5326e 100644 --- a/scripts/cmake/vcpkg_from_gitlab.cmake +++ b/scripts/cmake/vcpkg_from_gitlab.cmake @@ -13,6 +13,7 @@ vcpkg_from_gitlab( [SHA512 <45d0d7f8cc350...>] [HEAD_REF <master>] [PATCHES <patch1.patch> <patch2.patch>...] + [FILE_DISAMBIGUATOR <N>] ) ``` @@ -52,6 +53,9 @@ A list of patches to be applied to the extracted sources. Relative paths are based on the port directory. +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. @@ -66,7 +70,7 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. include(vcpkg_execute_in_download_mode) function(vcpkg_from_gitlab) - set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) + set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF FILE_DISAMBIGUATOR) set(multipleValuesArgs PATCHES) # parse parameters such that semicolons in options arguments to COMMAND don't get erased cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}") @@ -119,11 +123,17 @@ function(vcpkg_from_gitlab) endif() string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}") + if (_vdud_FILE_DISAMBIGUATOR) + set(downloaded_file_name "${downloaded_file_name}-${_vdud_FILE_DISAMBIGUATOR}") + endif() + + set(downloaded_file_name "${downloaded_file_name}.tar.gz") vcpkg_download_distfile(ARCHIVE URLS "${GITLAB_LINK}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" + FILENAME "${downloaded_file_name}" ) vcpkg_extract_source_archive_ex( |
