forked from ratanparai/cpp-template
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathBUILD
More file actions
87 lines (78 loc) · 1.88 KB
/
BUILD
File metadata and controls
87 lines (78 loc) · 1.88 KB
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
load("@rules_cc//cc:defs.bzl", "cc_binary")
# Demo of genrul
genrule(
name = "test",
srcs = [],
outs = ["test.txt"],
cmd = "echo 'Hello world' > $@",
)
cc_binary(
name = "main",
srcs = ["main.cc"],
deps = ["//src/lib:CPPLib"],
)
cc_binary(
name = "main_fib",
srcs = ["main_fib.cc"],
deps = ["//src/lib:CPPLib"],
)
cc_binary(
name = "main_logger",
srcs = ["main_logger.cc"],
deps = [
"//src/lib:CPPLib",
"@gflags",
"@glog",
],
)
cc_binary(
name = "main_flags_absl",
srcs = ["main_flags_absl.cc"],
deps = [
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@abseil-cpp//absl/flags:usage",
"@glog",
],
)
cc_binary(
name = "main_address_sanitize",
srcs = ["main_address_sanitize.cc"],
# Set this variable to the right path for llvm-symbolizer on your machine.
env =
{
# "ASAN_SYMBOLIZER_PATH": "/usr/local/Cellar/llvm/13.0.0_1/bin/llvm-symbolizer"
"ASAN_OPTIONS": "detect_stack_use_after_return=1",
},
deps = [
],
)
cc_binary(
name = "main_address_sanitize_simple",
srcs = ["main_address_sanitize_simple.cc"],
copts = ["-w"], # This disables *all* warnings
# Set this variable to the right path for llvm-symbolizer on your machine.
env =
{
# "ASAN_SYMBOLIZER_PATH": "/usr/local/Cellar/llvm/13.0.0_1/bin/llvm-symbolizer"
"ASAN_OPTIONS": "detect_stack_use_after_return=1",
},
deps = [
],
)
cc_binary(
name = "main_undefined_behavior_sanitizer",
srcs = ["main_undefined_behavior_sanitizer.cc"],
deps = [
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@abseil-cpp//absl/flags:usage",
"@glog",
],
)
cc_binary(
name = "fib_main",
srcs = ["fib_main.cc"],
deps = [
],
)