[bazel] Remove deprecated way to depend on googletest

pull/8396/head
Yannic Bonenberger 4 years ago
parent c6bce8c10f
commit a3aecacc24
  1. 44
      BUILD
  2. 12
      WORKSPACE

44
BUILD

@ -14,38 +14,6 @@ exports_files(["LICENSE"])
# build configuration
################################################################################
# TODO(yannic): Remove in 3.14.0.
string_flag(
name = "incompatible_use_com_google_googletest",
build_setting_default = "true",
values = ["true", "false"]
)
config_setting(
name = "use_com_google_googletest",
flag_values = {
"//:incompatible_use_com_google_googletest": "true"
},
)
GTEST = select({
"//:use_com_google_googletest": [
"@com_google_googletest//:gtest",
],
"//conditions:default": [
"//external:gtest",
],
})
GTEST_MAIN = select({
"//:use_com_google_googletest": [
"@com_google_googletest//:gtest_main",
],
"//conditions:default": [
"//external:gtest_main",
],
})
################################################################################
# ZLIB configuration
################################################################################
@ -571,6 +539,7 @@ COMMON_TEST_SRCS = [
cc_binary(
name = "test_plugin",
testonly = True,
srcs = [
# AUTOGEN(test_plugin_srcs)
"src/google/protobuf/compiler/mock_code_generator.cc",
@ -580,7 +549,8 @@ cc_binary(
deps = [
":protobuf",
":protoc_lib",
] + GTEST,
"@com_google_googletest//:gtest",
],
)
cc_test(
@ -592,7 +562,9 @@ cc_test(
],
deps = [
":protobuf_lite",
] + GTEST_MAIN,
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
@ -695,7 +667,9 @@ cc_test(
":cc_test_protos",
":protobuf",
":protoc_lib",
] + PROTOBUF_DEPS + GTEST_MAIN,
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
] + PROTOBUF_DEPS,
)
################################################################################

@ -29,18 +29,6 @@ bind(
actual = "//util/python:python_headers",
)
# TODO(yannic): Remove in 3.14.0.
bind(
name = "gtest",
actual = "@com_google_googletest//:gtest",
)
# TODO(yannic): Remove in 3.14.0.
bind(
name = "gtest_main",
actual = "@com_google_googletest//:gtest_main",
)
jvm_maven_import_external(
name = "guava_maven",
artifact = "com.google.guava:guava:18.0",

Loading…
Cancel
Save