xref: /freebsd/contrib/libcbor/examples/bazel/src/BUILD (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1load("@rules_cc//cc:defs.bzl", "cc_library")
2load("@rules_cc//cc:defs.bzl", "cc_binary")
3
4cc_library(
5    name = "src",
6    srcs = [
7        "hello.cc",
8    ],
9    hdrs = [
10        "hello.h",
11    ],
12    visibility = [
13        "//src:__pkg__",
14    ],
15    deps = [
16        "@libcbor//:cbor",
17    ],
18)
19
20cc_test(
21    name = "tests",
22    size = "small",
23    srcs = [
24        "hello_test.cc",
25    ],
26    visibility = [
27        "//visibility:private",
28    ],
29    deps = [
30        ":src",
31        "@gtest//:gtest_main",
32        "@libcbor//:cbor",
33    ],
34)
35
36
37cc_binary(
38    name = "hello",
39    srcs = [
40        "main.cc",
41    ],
42    deps = [
43        ":src",
44    ],
45)
46
47