-
Notifications
You must be signed in to change notification settings - Fork 654
/
BUILD
79 lines (70 loc) · 1.72 KB
/
BUILD
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
load("@protobuf//:protobuf.bzl", "cc_proto_library")
RELATIVE_WELL_KNOWN_PROTOS = [
"sofa/pbrpc/builtin_service.proto",
"sofa/pbrpc/rpc_meta.proto",
"sofa/pbrpc/rpc_option.proto"
]
WELL_KNOWN_PROTOS = ["src/" + s for s in RELATIVE_WELL_KNOWN_PROTOS]
filegroup(
name = "well_known_protos",
srcs = WELL_KNOWN_PROTOS,
visibility = ["//visibility:public"],
)
cc_proto_library(
name = "cc_protos",
srcs = WELL_KNOWN_PROTOS,
include = "src/",
default_runtime = "@protobuf//:protobuf",
protoc = "@protobuf//:protoc",
deps = ["@protobuf//:cc_wkt_protos"],
visibility = ["//visibility:public"]
)
cc_library(
name = "rapidjson",
hdrs = glob(["src/rapidjson/*.h", "src/rapidjson/internal/*.h"]),
srcs = [],
visibility = ["//main:__pkg__"],
)
cc_library(
name = "sofa-pbrpc",
hdrs = glob([
"src/sofa/pbrpc/*.h",
"src/sofa/pbrpc/smart_ptr/*.hpp",
"src/sofa/pbrpc/smart_ptr/detail/*.hpp"
]),
srcs = glob(["src/sofa/pbrpc/*.cc"]),
deps = [
":cc_protos",
":rapidjson",
"@protobuf//:protobuf",
"@protobuf//:protoc_lib",
"@snappy//:snappy",
"@zlib//:zlib",
"@gtest//:gtest",
"@boost//:boost"
],
copts = [
"-Iexternal/googletest/include",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "sofa-pbrpc-client-lib",
hdrs = ["src/sofa/pbrpc/http-agent/http_agent.h"],
srcs = ["src/sofa/pbrpc/http-agent/http_agent.cc"],
deps = [
":sofa-pbrpc",
],
visibility = ["//main:__pkg__"],
)
cc_binary(
name = "sofa-pbrpc-client",
srcs = [
"src/sofa/pbrpc/http-agent/sofa_pbrpc_client.cc",
],
deps = [
":sofa-pbrpc-client-lib",
],
visibility = ["//main:__pkg__"],
)
exports_files(["src/sofa/pbrpc/buffer.cc"], ["//unit-test:__pkg__"])