-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
Copy pathBUILD.bazel
62 lines (54 loc) · 1.46 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
61
62
licenses(["unencumbered"]) # Public Domain or MIT
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
exports_files(["LICENSE"])
bool_flag(
name = "use_exception",
build_setting_default = False,
)
config_setting(
name = "use_exception_cfg",
flag_values = {":use_exception": "true"},
)
bool_flag(
name = "has_int64",
build_setting_default = True,
)
config_setting(
name = "has_int64_cfg",
flag_values = {":has_int64": "true"},
)
cc_library(
name = "jsoncpp",
srcs = [
"src/lib_json/json_reader.cpp",
"src/lib_json/json_tool.h",
"src/lib_json/json_value.cpp",
"src/lib_json/json_writer.cpp",
],
hdrs = [
"include/json/allocator.h",
"include/json/assertions.h",
"include/json/config.h",
"include/json/json_features.h",
"include/json/forwards.h",
"include/json/json.h",
"include/json/reader.h",
"include/json/value.h",
"include/json/version.h",
"include/json/writer.h",
],
defines = select({
":use_exception_cfg": ["JSON_USE_EXCEPTION=1"],
"//conditions:default": ["JSON_USE_EXCEPTION=0"],
}) + select({
":has_int64_cfg": ["JSON_HAS_INT64"],
"//conditions:default": [],
}),
includes = ["include"],
visibility = ["//visibility:public"],
deps = [":private"],
)
cc_library(
name = "private",
textual_hdrs = ["src/lib_json/json_valueiterator.inl"],
)