Skip to content

Commit d72bae6

Browse files
wilhuffa-maurice
authored andcommitted
Modify external builds to download archives
GIT_SHALLOW is not available until CMake 3.6. It's also considerably slower for huge repositories like curl's. PiperOrigin-RevId: 297649878
1 parent 1243acc commit d72bae6

File tree

5 files changed

+27
-19
lines changed

5 files changed

+27
-19
lines changed

cmake/external/curl.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 Google
1+
# Copyright 2019 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,17 +18,18 @@ if(TARGET curl OR NOT DOWNLOAD_CURL)
1818
return()
1919
endif()
2020

21+
set(version 7_58_0)
22+
2123
ExternalProject_Add(
2224
curl
2325

24-
GIT_REPOSITORY https://github.com/curl/curl.git
25-
GIT_TAG curl-7_58_0
26-
GIT_SHALLOW 1
26+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
27+
URL https://github.com/curl/curl/archive/curl-${version}.tar.gz
2728

2829
PREFIX ${PROJECT_BINARY_DIR}
2930

3031
CONFIGURE_COMMAND ""
3132
BUILD_COMMAND ""
3233
INSTALL_COMMAND ""
3334
TEST_COMMAND ""
34-
)
35+
)

cmake/external/flatbuffers.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Google
1+
# Copyright 2018 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,17 +18,19 @@ if(TARGET flatbuffers OR NOT DOWNLOAD_FLATBUFFERS)
1818
return()
1919
endif()
2020

21+
set(version v1.10.0)
22+
2123
ExternalProject_Add(
2224
flatbuffers
2325

24-
GIT_REPOSITORY https://github.com/google/flatbuffers.git
25-
GIT_TAG v1.10.0
26-
GIT_SHALLOW 1
26+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
27+
DOWNLOAD_NAME flatbuffers-${version}.tar.gz
28+
URL https://github.com/google/flatbuffers/archive/${version}.tar.gz
2729

2830
PREFIX ${PROJECT_BINARY_DIR}
2931

3032
CONFIGURE_COMMAND ""
3133
BUILD_COMMAND ""
3234
INSTALL_COMMAND ""
3335
TEST_COMMAND ""
34-
)
36+
)

cmake/external/libuv.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 Google
1+
# Copyright 2019 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,12 +18,14 @@ if(TARGET libuv OR NOT DOWNLOAD_LIBUV)
1818
return()
1919
endif()
2020

21+
set(version v1.33.1)
22+
2123
ExternalProject_Add(
2224
libuv
2325

24-
GIT_REPOSITORY https://github.com/libuv/libuv
25-
GIT_TAG v1.33.1
26-
GIT_SHALLOW 1
26+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
27+
DOWNLOAD_NAME libuv-${version}.tar.gz
28+
URL https://github.com/libuv/libuv/archive/${version}.tar.gz
2729

2830
PREFIX ${PROJECT_BINARY_DIR}
2931

cmake/external/uWebSockets.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 Google
1+
# Copyright 2019 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,16 +18,19 @@ if(TARGET uWebSockets OR NOT DOWNLOAD_UWEBSOCKETS)
1818
return()
1919
endif()
2020

21+
set(commit 4d94401b9c98346f9afd838556fdc7dce30561eb)
22+
2123
ExternalProject_Add(
2224
uWebSockets
2325

24-
GIT_REPOSITORY https://github.com/uNetworking/uWebSockets
25-
GIT_TAG 4d94401b9c98346f9afd838556fdc7dce30561eb
26+
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
27+
DOWNLOAD_NAME uWebSockets-${commit}.tar.gz
28+
URL https://github.com/uNetworking/uWebSockets/archive/${commit}.tar.gz
2629

2730
PREFIX ${PROJECT_BINARY_DIR}
2831

2932
CONFIGURE_COMMAND ""
3033
BUILD_COMMAND ""
3134
INSTALL_COMMAND ""
3235
TEST_COMMAND ""
33-
)
36+
)

cmake/external/zlib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ ExternalProject_Add(
3232
BUILD_COMMAND ""
3333
INSTALL_COMMAND ""
3434
TEST_COMMAND ""
35-
)
35+
)

0 commit comments

Comments
 (0)