aboutsummaryrefslogtreecommitdiffstats
path: root/BUILD.bazel
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2017-08-09 11:47:54 -0400
committermisterg <misterg@google.com>2017-08-09 11:47:54 -0400
commitac885f3ab2a50689f334d2bf3a53ead9312601dc (patch)
treecf31829bc3430405db0e5f85272f1cab13b7910e /BUILD.bazel
parentab8f2b0d09eb926a31b582482550c7d5c52d2fe9 (diff)
downloadgoogletest-ac885f3ab2a50689f334d2bf3a53ead9312601dc.tar.gz
googletest-ac885f3ab2a50689f334d2bf3a53ead9312601dc.tar.bz2
googletest-ac885f3ab2a50689f334d2bf3a53ead9312601dc.zip
WIP
Diffstat (limited to 'BUILD.bazel')
-rw-r--r--BUILD.bazel78
1 files changed, 9 insertions, 69 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index 35123b84..9c58f81e 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -8,37 +8,11 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
-cc_library(
- name = "gmock",
- srcs = glob(
- include = [
- "googlemock/src/*.cc",
- "googlemock/include/gmock/**/*.h",
- ],
- exclude = [
- "googlemock/src/gmock-all.cc",
- ],
- ),
- hdrs = glob([
- "googlemock/include/gmock/*.h",
- ]),
- includes = [
- "googlemock",
- "googlemock/include",
- ],
- linkopts = select({
- ":win": [],
- "//conditions:default": ["-pthread"],
- }),
- deps = [
- ":gtest",
- ],
-)
-
# gtest public API.
GTEST_HDRS = \
glob([
"googletest/include/gtest/*.h",
+ "googlemock/include/gmock/*.h",
])
config_setting(
@@ -54,10 +28,13 @@ cc_library(
"googletest/src/*.cc",
"googletest/src/*.h",
"googletest/include/gtest/**/*.h",
+ "googlemock/src/*.cc",
+ "googlemock/include/gmock/**/*.h",
],
exclude = [
"googletest/src/gtest-all.cc",
"googletest/src/gtest_main.cc",
+ "googlemock/src/gmock-all.cc",
],
),
hdrs = GTEST_HDRS,
@@ -68,39 +45,8 @@ cc_library(
},
),
includes = [
- "googletest",
- "googletest/include",
- ],
- linkopts = select({
- ":win": [],
- "//conditions:default": [
- "-pthread",
- ],
- }),
-)
-
-## Google Test with exceptions enabled.
-cc_library(
- name = "gtest_ex",
- srcs = glob(
- include = [
- "googletest/src/*.cc",
- "googletest/src/*.h",
- "googletest/include/gtest/**/*.h",
- ],
- exclude = [
- "googletest/src/gtest-all.cc",
- "googletest/src/gtest_main.cc",
- ],
- ),
- hdrs = GTEST_HDRS,
- copts = select(
- {
- ":win": ["-DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"],
- "//conditions:default": ["-fexceptions","-pthread"],
- },
- ),
- includes = [
+ "googlemock",
+ "googlemock/include",
"googletest",
"googletest/include",
],
@@ -114,15 +60,9 @@ cc_library(
cc_library(
name = "gtest_main",
- srcs = glob(
- include = [
- "googletest/src/gtest_main.cc",
- ],
- ),
- hdrs = glob([
- "googletest/include/gtest/*.h",
- "googletest/include/gtest/**/*.h",
- ]),
+ srcs = [
+ "googletest/src/gtest_main.cc",
+ ],
includes = [
"googletest",
"googletest/include",