diff --git a/BUILD.bazel b/BUILD.bazel index 3ca5735d..5ab4e114 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -30,6 +30,8 @@ # # Bazel Build for Google C++ Testing Framework(Google Test) +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) diff --git a/MODULE.bazel b/MODULE.bazel index 5d80b462..5b32557f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -52,6 +52,11 @@ bazel_dep( version = "2024-07-02.bcr.1", ) +bazel_dep( + name = "rules_cc", + version = "0.2.8" +) + bazel_dep( name = "rules_python", version = "1.3.0", diff --git a/WORKSPACE b/WORKSPACE index 0ae5dee9..f004f565 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -45,12 +45,6 @@ http_archive( load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories() -http_archive( - name = "bazel_skylib", - sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"], -) - http_archive( name = "platforms", urls = [ @@ -59,3 +53,9 @@ http_archive( ], sha256 = "29742e87275809b5e598dc2f04d86960cc7a55b3067d97221c9abbc9926bff0f", ) + +load("@bazel_features//:deps.bzl", "bazel_features_deps") +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") +compatibility_proxy_repo() diff --git a/googlemock/test/BUILD.bazel b/googlemock/test/BUILD.bazel index d4297c80..27eb5351 100644 --- a/googlemock/test/BUILD.bazel +++ b/googlemock/test/BUILD.bazel @@ -30,6 +30,7 @@ # # Bazel Build for Google C++ Testing Framework(Google Test)-googlemock +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test") load("@rules_python//python:defs.bzl", "py_library", "py_test") licenses(["notice"]) diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel index c561ef8b..9575ae11 100644 --- a/googletest/test/BUILD.bazel +++ b/googletest/test/BUILD.bazel @@ -30,6 +30,7 @@ # # Bazel BUILD for The Google C++ Testing Framework (Google Test) +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test") load("@rules_python//python:defs.bzl", "py_library", "py_test") licenses(["notice"]) diff --git a/googletest_deps.bzl b/googletest_deps.bzl index e5fc4be4..9b5c041e 100644 --- a/googletest_deps.bzl +++ b/googletest_deps.bzl @@ -22,6 +22,22 @@ def googletest_deps(): urls = ["https://github.com/abseil/abseil-cpp/releases/download/20250814.0/abseil-cpp-20250814.0.tar.gz"], ) + if not native.existing_rule("bazel_features"): + http_archive( + name = "bazel_features", + sha256 = "9390b391a68d3b24aef7966bce8556d28003fe3f022a5008efc7807e8acaaf1a", + strip_prefix = "bazel_features-1.36.0", + url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.36.0/bazel_features-v1.36.0.tar.gz", + ) + + if not native.existing_rule("rules_cc"): + http_archive( + name = "rules_cc", + sha256 = "207ea073dd20a705f9e8bc5ac02f5203e9621fc672774bb1a0935aefab7aebfa", + strip_prefix = "rules_cc-0.2.8", + url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.8/rules_cc-0.2.8.tar.gz", + ) + if not native.existing_rule("fuchsia_sdk"): fake_fuchsia_sdk( name = "fuchsia_sdk",