aboutsummaryrefslogtreecommitdiffstats
path: root/BUILD.bazel
diff options
context:
space:
mode:
authorYannic Bonenberger <contact@yannic-bonenberger.com>2019-08-07 17:04:29 +0200
committerYannic Bonenberger <contact@yannic-bonenberger.com>2019-08-07 17:08:10 +0200
commit6fd262ecf787d0dc2a91696fd4bf1d3ee1ebfa14 (patch)
tree6aab2846ea9701eb8136f059881802ebb6a1890a /BUILD.bazel
parent6a2adc0eedd8ca47f1808dcd315b17666fb2fbe4 (diff)
downloadgoogletest-6fd262ecf787d0dc2a91696fd4bf1d3ee1ebfa14.tar.gz
googletest-6fd262ecf787d0dc2a91696fd4bf1d3ee1ebfa14.tar.bz2
googletest-6fd262ecf787d0dc2a91696fd4bf1d3ee1ebfa14.zip
Prepare for Bazel incompatible changes
Fixes googletest for upcoming `--incompatible_load_cc_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/8743) and `--incompatible_load_python_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/9006). This change was automatically generated with `buildifier -lint=fix -warnings=all $(find . -name "BUILD" -o -name "BUILD.bazel" -o -name "*.bzl")`.
Diffstat (limited to 'BUILD.bazel')
-rw-r--r--BUILD.bazel18
1 files changed, 10 insertions, 8 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index f0c4ce54..9b48aee5 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"])
@@ -81,6 +83,10 @@ cc_library(
":has_absl": ["GTEST_HAS_ABSL=1"],
"//conditions:default": [],
}),
+ features = select({
+ ":windows": ["windows_export_all_symbols"],
+ "//conditions:default": [],
+ }),
includes = [
"googlemock",
"googlemock/include",
@@ -102,20 +108,16 @@ cc_library(
],
"//conditions:default": [],
}),
- features = select({
- ":windows": ["windows_export_all_symbols"],
- "//conditions:default": [],
- })
)
cc_library(
name = "gtest_main",
srcs = ["googlemock/src/gmock_main.cc"],
- deps = [":gtest"],
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
- })
+ }),
+ deps = [":gtest"],
)
# The following rules build samples of how to use gTest.
@@ -136,7 +138,7 @@ cc_library(
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
- })
+ }),
)
cc_test(
@@ -155,11 +157,11 @@ cc_test(
"googletest/samples/sample7_unittest.cc",
"googletest/samples/sample8_unittest.cc",
],
+ linkstatic = 0,
deps = [
"gtest_sample_lib",
":gtest_main",
],
- linkstatic = 0,
)
cc_test(