-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
94 lines (83 loc) · 2.23 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
load("@rules_cc//cc:defs.bzl", "cc_binary")
# NOTE: instead of 'cc_grpc_library' from '@com_github_grpc_grpc'
# could also use 'cpp_grpc_library' from 'rules_proto_grpc' (by first
# bringing in 'rules_proto_grpc' in WORKSPACE.bazel).
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@com_github_3rdparty_eventuals_grpc//bazel:cc_eventuals_library.bzl", "cc_eventuals_library")
proto_library(
name = "route_guide",
srcs = ["protos/route_guide.proto"],
)
cc_proto_library(
name = "route_guide_proto",
deps = [":route_guide"],
)
cc_grpc_library(
name = "route_guide_grpc",
srcs = [":route_guide"],
grpc_only = True,
deps = [":route_guide_proto"],
)
cc_binary(
name = "route_guide_client",
srcs = [
"route_guide/helper.cc",
"route_guide/helper.h",
"route_guide/route_guide_client.cc",
],
data = ["route_guide/route_guide_db.json"],
deps = [
":route_guide_grpc",
"@com_github_grpc_grpc//:grpc++",
],
)
cc_binary(
name = "route_guide_server",
srcs = [
"route_guide/helper.cc",
"route_guide/helper.h",
"route_guide/route_guide_server.cc",
],
data = ["route_guide/route_guide_db.json"],
deps = [
":route_guide_grpc",
"@com_github_grpc_grpc//:grpc++",
],
)
cc_binary(
name = "route_guide_eventuals_client",
srcs = [
"route_guide/helper.cc",
"route_guide/helper.h",
"route_guide/route_guide_eventuals_client.cc",
],
data = ["route_guide/route_guide_db.json"],
deps = [
":route_guide_grpc",
"@com_github_3rdparty_eventuals_grpc//:grpc",
],
)
cc_eventuals_library(
name="route_guide_eventuals_generated",
deps=[":route_guide"]
)
cc_library(
name="route_guide_eventuals",
srcs=["route_guide_eventuals_generated"],
deps=[
":route_guide_grpc",
"@com_github_3rdparty_eventuals_grpc//:grpc",
],
)
cc_binary(
name = "route_guide_eventuals_server",
srcs = [
"route_guide/helper.cc",
"route_guide/helper.h",
"route_guide/route_guide_eventuals_server.cc",
],
data = ["route_guide/route_guide_db.json"],
deps = [
":route_guide_eventuals",
],
)