Do not use GIT in FetchContent_Declare

This causes whole repo (with history) to be fetched.
Protobuf repo is especially big (>200MiB).

PiperOrigin-RevId: 549285765
Change-Id: Ifb5e3a549a014adb51e6e5eef41e72abf0149558
pull/171/head
Wiktor Garbacz 2023-07-19 05:19:41 -07:00 committed by Copybara-Service
parent 25f27ef935
commit 7683f6995b
5 changed files with 11 additions and 11 deletions

View File

@ -13,8 +13,8 @@
# limitations under the License.
FetchContent_Declare(absl
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
GIT_TAG ae87791869cacbc125aa708108c4721e51ff703d # 2023-06-08
URL https://github.com/abseil/abseil-cpp/archive/ae87791869cacbc125aa708108c4721e51ff703d.zip # 2023-06-08
URL_HASH SHA256=fbe050daabadda2297cea9ace55ccde48e3994887bc0b1e6c7330f1a97ee071b
)
set(ABSL_CXX_STANDARD ${SAPI_CXX_STANDARD} CACHE STRING "" FORCE)
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)

View File

@ -13,8 +13,8 @@
# limitations under the License.
FetchContent_Declare(benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG 604f6fd3f4b34a84ec4eb4db81d842fa4db829cd # 2023-05-30
URL https://github.com/google/benchmark/archive/604f6fd3f4b34a84ec4eb4db81d842fa4db829cd.zip # 2023-05-30
URL_HASH SHA256=342705876335bf894147e052d0dac141fe15962034b41bef5aa59c4b279ca89c
)
set(BENCHMARK_ENABLE_TESTING OFF)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF)

View File

@ -13,7 +13,7 @@
# limitations under the License.
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG 334704df263b480a3e9e7441ed3292a5e30a37ec # 2023-06-06
URL https://github.com/google/googletest/archive/334704df263b480a3e9e7441ed3292a5e30a37ec.zip # 2023-06-06
URL_HASH SHA256=a217118c2c36a3632b594af7ff98111a65bb2b980b726a7fa62305e02a998440
)
FetchContent_MakeAvailable(googletest)

View File

@ -13,8 +13,8 @@
# limitations under the License.
FetchContent_Declare(protobuf
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
GIT_TAG v23.2 # 2023-05-26
URL https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz
URL_HASH SHA256=a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971
)
set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE)

View File

@ -63,9 +63,9 @@ def sapi_deps():
maybe(
http_archive,
name = "com_google_protobuf",
sha256 = "ddf8c9c1ffccb7e80afd183b3bd32b3b62f7cc54b106be190bf49f2bc09daab5", # 2023-05-26
strip_prefix = "protobuf-23.2",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.2/protobuf-23.2.tar.gz"],
sha256 = "a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971", # 2023-07-06
strip_prefix = "protobuf-23.4",
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz"],
)
# libcap