blob: 076e18ce5f2b354019842d283897f7a14f47b502 [file] [log] [blame]
Austin Schuhf9724442018-10-28 20:30:21 -07001load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
James Kuszmaul27da8142019-07-21 16:13:55 -07002load("//tools/cpp/emscripten:defs.bzl", "emcc_binary")
James Kuszmaulf385c462019-12-24 09:37:34 -08003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_python_library")
James Kuszmaul27da8142019-07-21 16:13:55 -07004
5emcc_binary(
6 name = "helloworld.html",
7 srcs = ["helloworld.cc"],
8)
Brian Silvermanb67da232015-09-12 23:50:30 -04009
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070010emcc_binary(
11 name = "webgl.html",
12 srcs = ["webgl_draw_triangle.c"],
13)
14
15emcc_binary(
16 name = "webgl2.html",
James Kuszmaul36816f32019-08-31 16:58:23 -070017 srcs = ["webgl2_benchmark.cc"],
18 html_shell = "minimal_shell.html",
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070019 # Enable WEBGL2 (-s is used by the emscripten
20 # compiler to specify sundry options).
21 linkopts = [
22 "-s",
23 "USE_WEBGL2=1",
James Kuszmaul36816f32019-08-31 16:58:23 -070024 "-s",
25 "TOTAL_MEMORY=" + repr(256 * 1024 * 1024),
James Kuszmaul9a05bfd2019-08-03 17:03:38 -070026 ],
27)
28
Brian Silvermanfbe79b82015-09-12 15:10:54 -040029cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -070030 name = "gflags_build_test",
31 size = "small",
32 srcs = [
33 "gflags.cc",
34 ],
35 deps = [
Brian Silverman16a923c2018-10-31 19:40:51 -070036 "@com_github_gflags_gflags//:gflags",
Austin Schuhf9724442018-10-28 20:30:21 -070037 ],
Brian Silvermanfbe79b82015-09-12 15:10:54 -040038)
Brian Silvermanb67da232015-09-12 23:50:30 -040039
Brian Silverman516ceb22015-11-27 01:29:05 -050040cc_binary(
Austin Schuhf9724442018-10-28 20:30:21 -070041 name = "tcmalloc_build_test_binary",
42 srcs = [
43 "tcmalloc.cc",
44 ],
Brian Silverman516ceb22015-11-27 01:29:05 -050045)
46
47sh_test(
Austin Schuhf9724442018-10-28 20:30:21 -070048 name = "tcmalloc_build_test",
49 size = "small",
50 srcs = [
51 "tcmalloc_test.sh",
52 ],
53 data = [
54 ":tcmalloc_build_test_binary",
55 ],
Brian Silverman516ceb22015-11-27 01:29:05 -050056)
Brian Silvermaneb16fa42016-02-20 15:29:56 -050057
Austin Schuhf9724442018-10-28 20:30:21 -070058cc_proto_library(
59 name = "proto_build_test_library",
60 srcs = ["proto.proto"],
61 deps = [
62 ":proto_build_test_library_base",
63 "@com_google_protobuf//:cc_wkt_protos",
64 ],
Parker Schuh971588a2017-03-01 22:15:04 -080065)
66
Austin Schuhf9724442018-10-28 20:30:21 -070067cc_proto_library(
68 name = "proto_build_test_library_base",
69 srcs = ["proto_base.proto"],
Brian Silvermaneb16fa42016-02-20 15:29:56 -050070)
71
72cc_test(
Austin Schuhf9724442018-10-28 20:30:21 -070073 name = "proto_build_test",
74 size = "small",
75 srcs = [
76 "proto.cc",
77 ],
78 deps = [
79 ":proto_build_test_library",
80 "//aos/testing:googletest",
81 ],
Brian Silvermaneb16fa42016-02-20 15:29:56 -050082)
James Kuszmaulf385c462019-12-24 09:37:34 -080083
84flatbuffer_python_library(
85 name = "test_python_fbs",
86 srcs = ["test.fbs"],
87 namespace = "aos.examples",
88 tables = [
89 "Foo",
90 "Bar",
91 ],
92 visibility = ["//visibility:public"],
93)
94
95py_test(
96 name = "python_fbs",
97 srcs = ["python_fbs.py"],
98 deps = [":test_python_fbs"],
99)