blob: 3599d6151561e7046f1290681d692ccf769bdacb [file] [log] [blame]
Brian Silverman019de8b2019-02-02 16:55:30 -08001licenses(["notice"])
2
3load("//tools:environments.bzl", "mcu_cpus")
4
5cc_library(
6 name = "optional",
7 hdrs = [
8 "tl/optional.hpp",
9 ],
10 compatible_with = mcu_cpus,
11 includes = ["."],
12 visibility = ["//visibility:public"],
13)
14
15cc_library(
16 name = "catch",
17 hdrs = [
18 "tests/catch.hpp",
19 ],
20)
21
22# Create a small wrapper because the tests want to #include "optional.hpp"
23# directly.
24cc_library(
25 name = "optional_test_wrapper",
26 includes = [
27 "./tl/",
28 ],
29 deps = [
30 ":optional",
31 ],
32)
33
34cc_test(
35 name = "optional_test",
36 srcs = glob([
37 "tests/*.cpp",
38 ]),
39 copts = [
40 "-fexceptions",
41 "-Wno-unused-parameter",
42 ],
43 deps = [
44 ":catch",
45 ":optional_test_wrapper",
46 ],
47)