This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
/
BUILD
116 lines (111 loc) · 3.61 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
licenses(["notice"])
exports_files(["LICENSE.md"])
cc_library(
name = "served",
copts = [],
srcs = [
"src/served/methods_handler.cpp",
"src/served/multiplexer.cpp",
"src/served/parameters.cpp",
"src/served/request.cpp",
"src/served/request_parser.cpp",
"src/served/request_parser_impl.cpp",
"src/served/response.cpp",
"src/served/status.cpp",
"src/served/uri.cpp",
"src/served/uri.hpp",
"src/served/mux/regex_matcher.cpp",
"src/served/mux/static_matcher.cpp",
"src/served/mux/variable_matcher.cpp",
"src/served/net/connection.cpp",
"src/served/net/connection_manager.cpp",
"src/served/net/server.cpp",
"src/served/plugins/access_log.cpp",
],
hdrs = [
":servedversion",
"src/served/methods_handler.hpp",
"src/served/methods.hpp",
"src/served/multiplexer.hpp",
"src/served/parameters.hpp",
"src/served/plugins.hpp",
"src/served/request_error.hpp",
"src/served/request.hpp",
"src/served/request_parser.hpp",
"src/served/request_parser_impl.hpp",
"src/served/response.hpp",
"src/served/served.hpp",
"src/served/status.hpp",
"src/served/uri.hpp",
"src/served/mux/empty_matcher.hpp",
"src/served/mux/matchers.hpp",
"src/served/mux/regex_matcher.hpp",
"src/served/mux/segment_matcher.hpp",
"src/served/mux/static_matcher.hpp",
"src/served/mux/variable_matcher.hpp",
"src/served/net/connection.hpp",
"src/served/net/connection_manager.hpp",
"src/served/net/server.hpp",
],
defines = select({
"@bazel_tools//src/conditions:windows": ["NOGDI"],
"//conditions:default": [],
}),
strip_include_prefix = "src/",
visibility = ["//visibility:public"],
deps = [
"@boost//:system",
"@boost//:asio",
"@boost//:date_time",
],
)
cc_binary(
name = "example-handlers",
copts = ["-Isrc",],
srcs = [
"src/examples/handlers/main.cpp",
],
deps = [ "//:served" ],
)
cc_test(
name = "served-test",
copts = ["-Isrc",],
srcs = [
"src/served/methods_handler.test.cpp",
"src/served/multiplexer.test.cpp",
"src/served/parameters.test.cpp",
"src/served/request_error.test.cpp",
"src/served/request_parser_impl.test.cpp",
"src/served/request_parser.test.cpp",
"src/served/request.test.cpp",
"src/served/response.test.cpp",
"src/served/status.test.cpp",
"src/served/uri.test.cpp",
"src/served/mux/matchers.test.cpp",
"src/served/net/connection_manager.test.cpp",
"src/served/net/connection.test.cpp",
"src/served/net/server.test.cpp",
"src/test/catch.cpp",
"src/test/catch.hpp",
],
timeout = "short",
deps = [ "//:served" ],
)
genrule(
name = "servedversion",
srcs = [],
outs = ["src/served/version.hpp"],
cmd = """
echo '#ifndef SERVED_VERSION_HPP_INCLUDED' > $@
echo '#define SERVED_VERSION_HPP_INCLUDED' >> $@
echo '#define APPLICATION_NAME \"Served HTTP REST Library\"' >> $@
echo '#define APPLICATION_CODENAME \"served\"' >> $@
echo '#define APPLICATION_COPYRIGHT_YEARS \"2014\"' >> $@
echo '#define APPLICATION_VERSION_STRING \"1.4.3-DS1\"' >> $@
echo '#define APPLICATION_VENDOR_ID \"com.meltwater\"' >> $@
echo '#define APPLICATION_VENDOR_NAME \"Meltwater\"' >> $@
echo '#define APPLICATION_VENDOR_URL \"meltwater.com\"' >> $@
echo '#define APPLICATION_ID = \"com.meltwater.served\"' >> $@
echo '#endif' >> $@
""",
)