Skip to content

Commit

Permalink
Multi-config / multi-arch schemes now do multiple downloads
Browse files Browse the repository at this point in the history
* Doing one download is a nice optimistion, but it has been
  broken by cmake 3.28 and its quite messy to re-implement
* See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8823
  • Loading branch information
hjmallon committed Dec 20, 2023
1 parent a768595 commit 4035cf8
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@)
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${variant}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ foreach(arch ${configure_architectures})
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${arch}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
2 changes: 1 addition & 1 deletion cmake/projects/botan/schemes/url_sha1_botan_ios.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ foreach(variant ${configure_architectures})
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@ # SHA1 hash
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@" # Archive destination location
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${variant}" # Archive destination location
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ foreach(build_config_type @HUNTER_PACKAGE_CONFIGURATION_TYPES@)
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${build_config_type}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ foreach(build_config_type @HUNTER_PACKAGE_CONFIGURATION_TYPES@)
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${build_config_type}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
2 changes: 1 addition & 1 deletion cmake/projects/x264/schemes/url_sha1_x264.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ else()
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${ios_architecture}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
5 changes: 1 addition & 4 deletions cmake/schemes/git_tag_cmake.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ else()
endif()

foreach(configuration ${configuration_types})
# All configurations use the same URL which will be downloaded only once
# i.e. overhead only for unpacking archive + no files from the previous
# build will be left in case package do some insource modification (wrongly)
string(TOUPPER "${configuration}" configuration_upper)
string(COMPARE EQUAL "${configuration_upper}" "RELEASE" is_release)
set(postfix_name "CMAKE_${configuration_upper}_POSTFIX")
Expand Down Expand Up @@ -168,7 +165,7 @@ foreach(configuration ${configuration_types})
GIT_SHALLOW
${http_credentials}
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${configuration}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down
5 changes: 1 addition & 4 deletions cmake/schemes/url_sha1_cmake.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ else()
endif()

foreach(configuration ${configuration_types})
# All configurations use the same URL which will be downloaded only once
# i.e. overhead only for unpacking archive + no files from the previous
# build will be left in case package do some insource modification (wrongly)
string(TOUPPER "${configuration}" configuration_upper)
string(COMPARE EQUAL "${configuration_upper}" "RELEASE" is_release)
set(postfix_name "CMAKE_${configuration_upper}_POSTFIX")
Expand Down Expand Up @@ -167,7 +164,7 @@ foreach(configuration ${configuration_types})
SHA1=@HUNTER_PACKAGE_SHA1@
${http_credentials}
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
"@HUNTER_PACKAGE_DOWNLOAD_DIR@/${configuration}"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
Expand Down

0 comments on commit 4035cf8

Please sign in to comment.