WIP
This commit is contained in:
parent
5a5e3c17bb
commit
66a036959f
15
BUILD.bazel
15
BUILD.bazel
@ -8,19 +8,12 @@ package(default_visibility = ["//visibility:public"])
|
|||||||
|
|
||||||
licenses(["notice"])
|
licenses(["notice"])
|
||||||
|
|
||||||
# gtest public API.
|
|
||||||
GTEST_HDRS = \
|
|
||||||
glob([
|
|
||||||
"googletest/include/gtest/*.h",
|
|
||||||
"googlemock/include/gmock/*.h",
|
|
||||||
])
|
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "win",
|
name = "win",
|
||||||
values = {"cpu": "x64_windows_msvc"},
|
values = {"cpu": "x64_windows_msvc"},
|
||||||
)
|
)
|
||||||
|
|
||||||
# Google Test
|
# Google Test including Google Mock
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "gtest",
|
name = "gtest",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
@ -35,9 +28,13 @@ cc_library(
|
|||||||
"googletest/src/gtest-all.cc",
|
"googletest/src/gtest-all.cc",
|
||||||
"googletest/src/gtest_main.cc",
|
"googletest/src/gtest_main.cc",
|
||||||
"googlemock/src/gmock-all.cc",
|
"googlemock/src/gmock-all.cc",
|
||||||
|
"googlemock/src/gmock_main.cc",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
hdrs = GTEST_HDRS,
|
hdrs =glob([
|
||||||
|
"googletest/include/gtest/*.h",
|
||||||
|
"googlemock/include/gmock/*.h",
|
||||||
|
]),
|
||||||
copts = select(
|
copts = select(
|
||||||
{
|
{
|
||||||
":win": [],
|
":win": [],
|
||||||
|
25
googlemock/test/BUILD.bazel
Normal file
25
googlemock/test/BUILD.bazel
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Copyright 2017 Google Inc. All Rights Reserved.
|
||||||
|
# Author: misterg@google.com (Gennadiy Civil)
|
||||||
|
#
|
||||||
|
# Description:
|
||||||
|
# Bazel BUILD file for googletest-googlemock/test, initial revision
|
||||||
|
#
|
||||||
|
|
||||||
|
""" gmock own tests """
|
||||||
|
|
||||||
|
cc_test(
|
||||||
|
name = "gmock_all_test",
|
||||||
|
size = "small",
|
||||||
|
srcs = glob(
|
||||||
|
include = [
|
||||||
|
"gmock-*.cc",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
linkopts = select({
|
||||||
|
"//:win": [],
|
||||||
|
"//conditions:default": [
|
||||||
|
"-pthread",
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
deps = ["//:gtest"],
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user