diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2021-06-11 09:58:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-11 09:58:25 -0700 |
| commit | abcaa4ba097d6764dfdd0877e49eeed37411a48b (patch) | |
| tree | d4c2cf0722d47229f49c6d54b6c5708b28f1889c /scripts | |
| parent | 13c8ffbfadb6bc68ddc58f3eb1f24e47d1cc4cec (diff) | |
| download | vcpkg-abcaa4ba097d6764dfdd0877e49eeed37411a48b.tar.gz vcpkg-abcaa4ba097d6764dfdd0877e49eeed37411a48b.zip | |
[vcpkg_download_distfile] Add explicit case for "0" (#18285)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_download_distfile.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 208871e3e..1b06d7b5b 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -80,6 +80,13 @@ function(vcpkg_download_distfile VAR) message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") endif() endif() + if(vcpkg_download_distfile_SHA512 STREQUAL "0") + string(REPEAT "0" 128 vcpkg_download_distfile_SHA512) + endif() + string(LENGTH "${vcpkg_download_distfile_SHA512}" vcpkg_download_distfile_SHA512_length) + if(NOT vcpkg_download_distfile_SHA512_length EQUAL "128") + message(FATAL_ERROR "Invalid SHA512: ${vcpkg_download_distfile_SHA512}. If you do not know the file's SHA512, set this to \"0\".") + endif() set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") |
