-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththrift.BUILD
62 lines (56 loc) · 1.45 KB
/
thrift.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
# Description:
# Apache Thrift library
# deps
# boost
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
cc_library(
name = "thrift",
srcs = glob([
"lib/cpp/src/thrift/**/*.h",
]) + [
"lib/cpp/src/thrift/protocol/TProtocol.cpp",
"lib/cpp/src/thrift/transport/TBufferTransports.cpp",
"lib/cpp/src/thrift/transport/TTransportException.cpp",
],
hdrs = [
"compiler/cpp/src/thrift/version.h",
"lib/cpp/src/thrift/config.h",
],
includes = [
"lib/cpp/src",
],
textual_hdrs = [
"lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc",
"lib/cpp/src/thrift/protocol/TCompactProtocol.tcc",
],
deps = [
"@boost//:asio"
],
)
genrule(
name = "version_h",
srcs = [
"compiler/cpp/src/thrift/version.h.in",
],
outs = [
"compiler/cpp/src/thrift/version.h",
],
cmd = "sed 's/@PACKAGE_VERSION@/0.12.0/g' $< > $@",
)
genrule(
name = "config_h",
srcs = ["build/cmake/config.h.in"],
outs = ["lib/cpp/src/thrift/config.h"],
cmd = ("sed " +
"-e 's/cmakedefine/define/g' " +
"-e 's/$${PACKAGE}/thrift/g' " +
"-e 's/$${PACKAGE_BUGREPORT}//g' " +
"-e 's/$${PACKAGE_NAME}/thrift/g' " +
"-e 's/$${PACKAGE_TARNAME}/thrift/g' " +
"-e 's/$${PACKAGE_URL}//g' " +
"-e 's/$${PACKAGE_VERSION}/0.12.0/g' " +
"-e 's/$${PACKAGE_STRING}/thrift 0.12.0/g' " +
"$< >$@"),
)