-
Notifications
You must be signed in to change notification settings - Fork 522
Expand file tree
/
Copy pathBUILD
More file actions
81 lines (77 loc) · 1.51 KB
/
BUILD
File metadata and controls
81 lines (77 loc) · 1.51 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
# Library to handle open location codes
cc_library(
name = "openlocationcode",
srcs = [
"openlocationcode.cc",
],
hdrs = [
"codearea.h",
"openlocationcode.h",
],
copts = [
"-pthread",
"-Wall",
"-Wextra",
"-O2",
],
linkopts = ["-pthread"],
deps = [
":codearea",
],
)
# Code area library, used by open location codes
cc_library(
name = "codearea",
srcs = [
"codearea.cc",
],
hdrs = [
"codearea.h",
],
visibility = ["//visibility:private"], # Keep private unless needed elsewhere
)
# Unit test for open location codes
cc_test(
name = "openlocationcode_test",
size = "small",
srcs = ["openlocationcode_test.cc"],
copts = [
"-pthread",
"-I@googletest//:include",
],
linkopts = ["-pthread"],
linkstatic = False,
data = [
"//test_data",
],
deps = [
":openlocationcode",
"@googletest//:gtest_main",
],
testonly = True,
)
# Unit test for code area library
cc_test(
name = "codearea_test",
size = "small",
srcs = ["codearea_test.cc"],
copts = [
"-pthread",
"-Iexternal/gtest/include",
],
linkopts = ["-pthread"],
deps = [
":codearea",
"@gtest//:main",
],
)
# Example binary for open location codes
cc_binary(
name = "openlocationcode_example",
srcs = [
"openlocationcode_example.cc",
],
deps = [
":openlocationcode",
],
)