aboutsummaryrefslogtreecommitdiff
path: root/contrib/libcbor/examples/bazel/src/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libcbor/examples/bazel/src/BUILD')
-rw-r--r--contrib/libcbor/examples/bazel/src/BUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/contrib/libcbor/examples/bazel/src/BUILD b/contrib/libcbor/examples/bazel/src/BUILD
new file mode 100644
index 000000000000..d3acb578398a
--- /dev/null
+++ b/contrib/libcbor/examples/bazel/src/BUILD
@@ -0,0 +1,46 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+load("@rules_cc//cc:defs.bzl", "cc_binary")
+
+cc_library(
+ name = "src",
+ srcs = [
+ "hello.cc",
+ ],
+ hdrs = [
+ "hello.h",
+ ],
+ visibility = [
+ "//src:__pkg__",
+ ],
+ deps = [
+ "@libcbor//:cbor",
+ ],
+)
+
+cc_test(
+ name = "tests",
+ size = "small",
+ srcs = [
+ "hello_test.cc",
+ ],
+ visibility = [
+ "//visibility:private",
+ ],
+ deps = [
+ ":src",
+ "@gtest//:gtest_main",
+ "@libcbor//:cbor",
+ ],
+)
+
+
+cc_binary(
+ name = "hello",
+ srcs = [
+ "main.cc",
+ ],
+ deps = [
+ ":src",
+ ],
+)
+