forked from Netflix/spectator-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
52 lines (51 loc) · 1.33 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
cc_library(
name = "spectator",
srcs = [
"spectator/logger.cc",
"spectator/publisher.cc",
],
hdrs = [
"spectator/config.h",
"spectator/id.h",
"spectator/logger.h",
"spectator/measurement.h",
"spectator/meter_type.h",
"spectator/publisher.h",
"spectator/registry.h",
"spectator/stateful_meters.h",
"spectator/stateless_meters.h",
"spectator/valid_chars.inc",
],
visibility = ["//visibility:public"],
deps = [
"@asio",
"@com_github_fmtlib_fmt//:fmtlib",
"@com_github_gabime_spdlog//:spdlog",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/strings",
],
)
cc_test(
name = "spectator_test",
srcs = glob([
"spectator/*_test.cc",
"spectator/test_*.cc",
"spectator/test_*.h",
]),
linkopts = select({
"@bazel_tools//src/conditions:linux_x86_64": [
"-lbfd",
"-ldl",
],
"//conditions:default": [],
}),
local_defines = select({
"@bazel_tools//src/conditions:linux_x86_64": ["BACKWARD_HAS_BFD=1"],
"//conditions:default": [],
}),
deps = [
":spectator",
"@com_github_bombela_backward//:backward",
"@com_google_googletest//:gtest",
],
)