-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
58 lines (54 loc) · 1.11 KB
/
BUILD
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
package(licenses = ["notice"])
exports_files([
"LICENSE",
"NOTICE",
])
cc_binary(
name = "ssstencil",
srcs = ["src/main.cc"],
copts = ["-UNDEBUG"],
deps = [
"@libprim//:prim",
"@tclap//:tclap",
],
visibility = ["//visibility:public"],
)
genrule(
name = "lint",
srcs = glob([
"src/**/*.cc",
"src/**/*.h",
"src/**/*.tcc",
]),
outs = ["linted"],
cmd = """
python $(location @cpplint//:cpplint) \
--root=$$(pwd) \
--headers=h,tcc \
--extensions=cc,h,tcc \
--quiet $(SRCS) > $@
echo // $$(date) > $@
""",
tools = [
"@cpplint",
],
visibility = ["//visibility:public"],
)
genrule(
name = "format_check",
srcs = glob([
"src/**/*.cc",
"src/**/*.h",
"src/**/*.tcc",
]),
outs = ["format_checked"],
cmd = """
cp $(location @clang_format//file) .clang-format
clang-format --style=file --dry-run --Werror $(SRCS)
echo // $$(date) > $@
""",
tools = [
"@clang_format//file",
],
visibility = ["//visibility:public"],
)