From 5af61373b5baf37bbab4ff0da4ddece9ee635c7c Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 17 Sep 2025 13:36:45 +0000 Subject: [PATCH] Use `bazel_dep` instead of vendored Google Test with Bazel (#3801) --- .bazelignore | 6 ++++++ MODULE.bazel | 1 + platform/ios/BUILD.bazel | 20 -------------------- render-test/BUILD.bazel | 1 + test/BUILD.bazel | 4 ++-- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.bazelignore b/.bazelignore index 085c7b7c7..4ea3360fd 100644 --- a/.bazelignore +++ b/.bazelignore @@ -9,3 +9,9 @@ bazel-testlogs .cxx build-* build + +# Ignore vendored Bazel workspaces that conflict with this repo +vendor/benchmark +vendor/googletest +vendor/maplibre-native-base/extras/rapidjson/thirdparty +vendor/eternal/vendor diff --git a/MODULE.bazel b/MODULE.bazel index 65e8f8a65..1b82678c2 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,6 +11,7 @@ bazel_dep(name = "libuv", version = "1.48.0") bazel_dep(name = "apple_support", version = "1.23.1", repo_name = "build_bazel_apple_support") bazel_dep(name = "rules_cc", version = "0.2.8") bazel_dep(name = "rules_shell", version = "0.6.1") +bazel_dep(name = "googletest", version = "1.17.0") node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) node.toolchain(node_version = "20.14.0") diff --git a/platform/ios/BUILD.bazel b/platform/ios/BUILD.bazel index e4726db2f..99ee205ce 100644 --- a/platform/ios/BUILD.bazel +++ b/platform/ios/BUILD.bazel @@ -219,26 +219,6 @@ ios_application( ], ) -ios_application( - name = "AppDynamicLib", - bundle_id = "org.maplibre.app", - families = [ - "iphone", - "ipad", - ], - frameworks = [ - "MapLibre.link", - ], - infoplists = ["app/Info.plist"], - minimum_os_version = "12.0", - provisioning_profile = ":xcode_profile", - resources = _IOS_APPLICATION_RESOURCES, - visibility = ["//visibility:public"], - deps = [ - "//platform:iosapp", - ], -) - ios_application( name = "BenchmarkApp", bundle_id = "{}.benchmark.app".format(BUNDLE_ID_PREFIX), diff --git a/render-test/BUILD.bazel b/render-test/BUILD.bazel index 790ab1b8c..deaf71e79 100644 --- a/render-test/BUILD.bazel +++ b/render-test/BUILD.bazel @@ -37,6 +37,7 @@ cc_library( ] + select({ "@platforms//os:ios": ["//platform:ios-sdk"], "@platforms//os:linux": ["//platform/linux:impl"], + "//conditions:default": [], }), ) diff --git a/test/BUILD.bazel b/test/BUILD.bazel index 99ce3b783..6f34e0e7f 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -6,7 +6,7 @@ cc_library( hdrs = glob(["include/mbgl/test/*.hpp"]), strip_include_prefix = "include", deps = [ - "//vendor/googletest:gtest", + "@googletest//:gtest", ], ) @@ -60,7 +60,7 @@ cc_library( "testutils", "//:mbgl-core", "//platform/default:mbgl-default", - "//vendor/googletest:gtest_main", + "@googletest//:gtest_main", ], alwayslink = True, )