Skip to content

Commit

Permalink
Refactor googletest_deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mvukov committed Dec 22, 2024
1 parent 5bf7f52 commit 13c6463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
2 changes: 2 additions & 0 deletions repositories/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

load("@bazel_features//:deps.bzl", "bazel_features_deps")
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
load("@googletest//:googletest_deps.bzl", "googletest_deps")
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

def ros2_deps():
Expand All @@ -11,3 +12,4 @@ def ros2_deps():
bazel_features_deps()
bazel_skylib_workspace()
rules_foreign_cc_dependencies()
googletest_deps()
29 changes: 0 additions & 29 deletions repositories/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ def ros2_workspace_repositories():
url = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz",
)

_googletest_deps()

maybe(
http_archive,
name = "tinyxml2",
Expand Down Expand Up @@ -330,30 +328,3 @@ def ros2_repositories():
strip_prefix = "rcl_logging_syslog-e63257f2d5ca693f286bbcedf2b23720675b7f73",
urls = ["https://github.com/fujitatomoya/rcl_logging_syslog/archive/e63257f2d5ca693f286bbcedf2b23720675b7f73.zip"],
)

def _googletest_deps():
"""Lists implicit googletest WORKSPACE deps.
Necessary such that e.g. `bazel fetch //...` can work.
The versions below taken from https://github.com/google/googletest/blob/v1.13.0/WORKSPACE.
TODO(mvukov) More recent commits in googletest have googletest_deps.bzl.
Integrate once a new release is available.
"""
maybe(
http_archive,
name = "com_google_absl", # 2023-01-10T21:08:25Z
sha256 = "f9a4e749f42c386a32a90fddf0e2913ed408d10c42f7f33ccf4c59ac4f0d1d05",
strip_prefix = "abseil-cpp-52835439ca90d86b27bf8cd1708296e95604d724",
urls = ["https://github.com/abseil/abseil-cpp/archive/52835439ca90d86b27bf8cd1708296e95604d724.zip"],
)

# Note this must use a commit from the `abseil` branch of the RE2 project.
# https://github.com/google/re2/tree/abseil
maybe(
http_archive,
name = "com_googlesource_code_re2", # 2022-12-21T14:29:10Z
sha256 = "b9ce3a51beebb38534d11d40f8928d40509b9e18a735f6a4a97ad3d014c87cb5",
strip_prefix = "re2-d0b1f8f2ecc2ea74956c7608b6f915175314ff0e",
urls = ["https://github.com/google/re2/archive/d0b1f8f2ecc2ea74956c7608b6f915175314ff0e.zip"],
)

0 comments on commit 13c6463

Please sign in to comment.