-
Notifications
You must be signed in to change notification settings - Fork 6
/
BUILD.bazel
60 lines (55 loc) · 1.59 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
53
54
55
56
57
58
59
60
config_setting(
name = "windows",
constraint_values = ["@platforms//os:windows"],
)
cc_binary(
name = "starter",
srcs = glob(["h2unit.h", "starter/*.c", "starter/*.h", "starter/*.cpp"]),
defines = ["H2UNIT_IMPORT_MAIN"],
copts = select({
":windows": [],
"//conditions:default": ["-fno-stack-protector"],
}),
linkopts = select({
":windows": [],
"//conditions:default": ["-rdynamic"],
}),
)
cc_binary(
name = "example1",
srcs = glob(["h2unit.h", "example/*.c", "example/*.h", "example/*.cpp"]),
includes = ["./example"],
defines = ["H2UNIT=1"],
copts = select({
":windows": [],
"//conditions:default": ["-fno-stack-protector"],
}),
linkopts = select({
":windows": [],
"//conditions:default": ["-rdynamic"],
}),
)
cc_binary(
name = "example2",
srcs = glob(["build/h2unit.cpp", "build/h2unit.hpp", "example/*.c", "example/*.h", "example/*.cpp"]),
includes = ["./example"],
defines = ["H2UNIT=2"],
copts = select({
":windows": [],
"//conditions:default": ["-fno-stack-protector"],
}),
linkopts = select({
":windows": [],
"//conditions:default": ["-rdynamic"],
}),
)
cc_binary(
name = "template_function_argument_deduction",
srcs = glob(["conformance/template_function_argument_deduction.cpp", "conformance/__common.hpp"]),
copts = ["-std=c++14"],
)
cc_binary(
name = "floating_point_precision",
srcs = glob(["conformance/floating_point_precision.cpp","conformance/__common.hpp"]),
copts = ["-std=c++14"],
)