xref: /freebsd/contrib/googletest/googletest_deps.bzl (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1"""Load dependencies needed to use the googletest library as a 3rd-party consumer."""
2
3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4load("//:fake_fuchsia_sdk.bzl", "fake_fuchsia_sdk")
5
6def googletest_deps():
7    """Loads common dependencies needed to use the googletest library."""
8
9    if not native.existing_rule("com_googlesource_code_re2"):
10        http_archive(
11            name = "com_googlesource_code_re2",
12            sha256 = "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b",
13            strip_prefix = "re2-2024-07-02",
14            urls = ["https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz"],
15        )
16
17    if not native.existing_rule("com_google_absl"):
18        http_archive(
19            name = "com_google_absl",
20            sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
21            strip_prefix = "abseil-cpp-20240116.2",
22            urls = ["https://github.com/abseil/abseil-cpp/releases/download/20240116.2/abseil-cpp-20240116.2.tar.gz"],
23        )
24
25    if not native.existing_rule("fuchsia_sdk"):
26        fake_fuchsia_sdk(
27            name = "fuchsia_sdk",
28        )
29