|
33 | 33 | set(ARROW_SOURCE_URL |
34 | 34 | "https://www.apache.org/dyn/closer.lua?action=download&filename=/arrow/arrow-${ICEBERG_ARROW_BUILD_VERSION}/apache-arrow-${ICEBERG_ARROW_BUILD_VERSION}.tar.gz" |
35 | 35 | "https://downloads.apache.org/arrow/arrow-${ICEBERG_ARROW_BUILD_VERSION}/apache-arrow-${ICEBERG_ARROW_BUILD_VERSION}.tar.gz" |
| 36 | + "https://mirrors.tuna.tsinghua.edu.cn/apache/arrow/arrow-${ICEBERG_ARROW_BUILD_VERSION}/apache-arrow-${ICEBERG_ARROW_BUILD_VERSION}.tar.gz" |
| 37 | + "https://mirrors.ustc.edu.cn/apache/arrow/arrow-${ICEBERG_ARROW_BUILD_VERSION}/apache-arrow-${ICEBERG_ARROW_BUILD_VERSION}.tar.gz" |
36 | 38 | ) |
37 | 39 | endif() |
38 | 40 |
|
@@ -164,17 +166,42 @@ function(resolve_avro_dependency) |
164 | 166 | OFF |
165 | 167 | CACHE BOOL "" FORCE) |
166 | 168 |
|
167 | | - fetchcontent_declare(avro-cpp |
168 | | - ${FC_DECLARE_COMMON_OPTIONS} |
169 | | - # TODO: switch to Apache Avro 1.13.0 once released. |
170 | | - GIT_REPOSITORY https://github.com/apache/avro.git |
171 | | - GIT_TAG e6c308780e876b4c11a470b9900995947f7b0fb5 |
172 | | - SOURCE_SUBDIR |
173 | | - lang/c++ |
174 | | - FIND_PACKAGE_ARGS |
175 | | - NAMES |
176 | | - avro-cpp |
177 | | - CONFIG) |
| 169 | + if(DEFINED ENV{ICEBERG_AVRO_URL}) |
| 170 | + # Support custom tarball URL |
| 171 | + fetchcontent_declare(avro-cpp |
| 172 | + ${FC_DECLARE_COMMON_OPTIONS} |
| 173 | + URL $ENV{ICEBERG_AVRO_URL} |
| 174 | + SOURCE_SUBDIR |
| 175 | + lang/c++ |
| 176 | + FIND_PACKAGE_ARGS |
| 177 | + NAMES |
| 178 | + avro-cpp |
| 179 | + CONFIG) |
| 180 | + elseif(DEFINED ENV{ICEBERG_AVRO_GIT_URL}) |
| 181 | + # Support custom git URL for mirrors |
| 182 | + fetchcontent_declare(avro-cpp |
| 183 | + ${FC_DECLARE_COMMON_OPTIONS} |
| 184 | + GIT_REPOSITORY $ENV{ICEBERG_AVRO_GIT_URL} |
| 185 | + GIT_TAG e6c308780e876b4c11a470b9900995947f7b0fb5 |
| 186 | + SOURCE_SUBDIR |
| 187 | + lang/c++ |
| 188 | + FIND_PACKAGE_ARGS |
| 189 | + NAMES |
| 190 | + avro-cpp |
| 191 | + CONFIG) |
| 192 | + else() |
| 193 | + # Default to GitHub - uses unreleased version |
| 194 | + fetchcontent_declare(avro-cpp |
| 195 | + ${FC_DECLARE_COMMON_OPTIONS} |
| 196 | + GIT_REPOSITORY https://github.com/apache/avro.git |
| 197 | + GIT_TAG e6c308780e876b4c11a470b9900995947f7b0fb5 |
| 198 | + SOURCE_SUBDIR |
| 199 | + lang/c++ |
| 200 | + FIND_PACKAGE_ARGS |
| 201 | + NAMES |
| 202 | + avro-cpp |
| 203 | + CONFIG) |
| 204 | + endif() |
178 | 205 |
|
179 | 206 | fetchcontent_makeavailable(avro-cpp) |
180 | 207 |
|
@@ -221,9 +248,20 @@ endfunction() |
221 | 248 | function(resolve_nanoarrow_dependency) |
222 | 249 | prepare_fetchcontent() |
223 | 250 |
|
| 251 | + if(DEFINED ENV{ICEBERG_NANOARROW_URL}) |
| 252 | + set(NANOARROW_URL "$ENV{ICEBERG_NANOARROW_URL}") |
| 253 | + else() |
| 254 | + set(NANOARROW_URL |
| 255 | + "https://dlcdn.apache.org/arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz" |
| 256 | + "https://downloads.apache.org/arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz" |
| 257 | + "https://mirrors.tuna.tsinghua.edu.cn/apache/arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz" |
| 258 | + "https://mirrors.ustc.edu.cn/apache/arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz" |
| 259 | + ) |
| 260 | + endif() |
| 261 | + |
224 | 262 | fetchcontent_declare(nanoarrow |
225 | 263 | ${FC_DECLARE_COMMON_OPTIONS} |
226 | | - URL "https://dlcdn.apache.org/arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz" |
| 264 | + URL ${NANOARROW_URL} |
227 | 265 | FIND_PACKAGE_ARGS |
228 | 266 | NAMES |
229 | 267 | nanoarrow |
@@ -270,9 +308,19 @@ function(resolve_croaring_dependency) |
270 | 308 | set(ENABLE_ROARING_TESTS OFF) |
271 | 309 | set(ENABLE_ROARING_MICROBENCHMARKS OFF) |
272 | 310 |
|
| 311 | + if(DEFINED ENV{ICEBERG_CROARING_URL}) |
| 312 | + set(CROARING_URL "$ENV{ICEBERG_CROARING_URL}") |
| 313 | + else() |
| 314 | + set(CROARING_URL |
| 315 | + "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.11.tar.gz" |
| 316 | + "https://gitee.com/mirrors/CRoaring/repository/archive/v4.3.11.tar.gz" |
| 317 | + "https://hub.fastgit.xyz/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.11.tar.gz" |
| 318 | + ) |
| 319 | + endif() |
| 320 | + |
273 | 321 | fetchcontent_declare(croaring |
274 | 322 | ${FC_DECLARE_COMMON_OPTIONS} |
275 | | - URL "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.11.tar.gz" |
| 323 | + URL ${CROARING_URL} |
276 | 324 | FIND_PACKAGE_ARGS |
277 | 325 | NAMES |
278 | 326 | roaring |
@@ -318,9 +366,19 @@ function(resolve_nlohmann_json_dependency) |
318 | 366 | OFF |
319 | 367 | CACHE BOOL "" FORCE) |
320 | 368 |
|
| 369 | + if(DEFINED ENV{ICEBERG_NLOHMANN_JSON_URL}) |
| 370 | + set(NLOHMANN_JSON_URL "$ENV{ICEBERG_NLOHMANN_JSON_URL}") |
| 371 | + else() |
| 372 | + set(NLOHMANN_JSON_URL |
| 373 | + "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz" |
| 374 | + "https://gitee.com/mirrors/JSON-for-Modern-CPP/releases/download/v3.11.3/json.tar.xz" |
| 375 | + "https://hub.fastgit.xyz/nlohmann/json/releases/download/v3.11.3/json.tar.xz" |
| 376 | + ) |
| 377 | + endif() |
| 378 | + |
321 | 379 | fetchcontent_declare(nlohmann_json |
322 | 380 | ${FC_DECLARE_COMMON_OPTIONS} |
323 | | - URL "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz" |
| 381 | + URL ${NLOHMANN_JSON_URL} |
324 | 382 | FIND_PACKAGE_ARGS |
325 | 383 | NAMES |
326 | 384 | nlohmann_json |
@@ -378,9 +436,19 @@ function(resolve_spdlog_dependency) |
378 | 436 | ON |
379 | 437 | CACHE BOOL "" FORCE) |
380 | 438 |
|
| 439 | + if(DEFINED ENV{ICEBERG_SPDLOG_URL}) |
| 440 | + set(SPDLOG_URL "$ENV{ICEBERG_SPDLOG_URL}") |
| 441 | + else() |
| 442 | + set(SPDLOG_URL |
| 443 | + "https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz" |
| 444 | + "https://gitee.com/mirrors/spdlog/repository/archive/v1.15.3.tar.gz" |
| 445 | + "https://hub.fastgit.xyz/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz" |
| 446 | + ) |
| 447 | + endif() |
| 448 | + |
381 | 449 | fetchcontent_declare(spdlog |
382 | 450 | ${FC_DECLARE_COMMON_OPTIONS} |
383 | | - URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz" |
| 451 | + URL ${SPDLOG_URL} |
384 | 452 | FIND_PACKAGE_ARGS |
385 | 453 | NAMES |
386 | 454 | spdlog |
@@ -440,9 +508,19 @@ function(resolve_cpr_dependency) |
440 | 508 | set(CPR_ENABLE_SSL ON) |
441 | 509 | set(CPR_USE_SYSTEM_CURL ON) |
442 | 510 |
|
| 511 | + if(DEFINED ENV{ICEBERG_CPR_URL}) |
| 512 | + set(CPR_URL "$ENV{ICEBERG_CPR_URL}") |
| 513 | + else() |
| 514 | + set(CPR_URL |
| 515 | + "https://github.com/libcpr/cpr/archive/refs/tags/1.12.0.tar.gz" |
| 516 | + "https://gitee.com/mirrors/cpr/repository/archive/1.12.0.tar.gz" |
| 517 | + "https://hub.fastgit.xyz/libcpr/cpr/archive/refs/tags/1.12.0.tar.gz" |
| 518 | + ) |
| 519 | + endif() |
| 520 | + |
443 | 521 | fetchcontent_declare(cpr |
444 | 522 | ${FC_DECLARE_COMMON_OPTIONS} |
445 | | - URL https://github.com/libcpr/cpr/archive/refs/tags/1.12.0.tar.gz |
| 523 | + URL ${CPR_URL} |
446 | 524 | FIND_PACKAGE_ARGS |
447 | 525 | NAMES |
448 | 526 | cpr |
|
0 commit comments