blob: 5c293f3cf629b249d985e924cc9f3d7c60cc943d [file] [log] [blame]
Keir Mierle45fa7852020-08-10 21:09:54 -07001# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load(
16 "//pw_build:pigweed.bzl",
17 "pw_cc_library",
18 "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
Rob Mohr5fc25412021-06-23 09:35:23 -070023licenses(["notice"])
Keir Mierle45fa7852020-08-10 21:09:54 -070024
25pw_cc_library(
26 name = "metric",
Nathaniel Brougha1113be2021-03-07 09:05:41 +080027 srcs = ["metric.cc"],
Keir Mierle45fa7852020-08-10 21:09:54 -070028 hdrs = [
Keir Mierle45fa7852020-08-10 21:09:54 -070029 "public/pw_metric/global.h",
Nathaniel Brougha1113be2021-03-07 09:05:41 +080030 "public/pw_metric/metric.h",
Keir Mierle45fa7852020-08-10 21:09:54 -070031 ],
32 includes = ["public"],
Keir Mierle45fa7852020-08-10 21:09:54 -070033 deps = [
34 "//pw_assert",
35 "//pw_containers",
36 "//pw_log",
37 "//pw_span",
Nathaniel Broughf91e7632021-07-26 17:12:14 +080038 "//pw_tokenizer:base64",
Keir Mierle45fa7852020-08-10 21:09:54 -070039 ],
40)
41
42pw_cc_library(
43 name = "global",
Nathaniel Brougha1113be2021-03-07 09:05:41 +080044 srcs = ["global.cc"],
Keir Mierle45fa7852020-08-10 21:09:54 -070045 hdrs = [
46 "public/pw_metric/global.h",
47 ],
Keir Mierle45fa7852020-08-10 21:09:54 -070048 deps = [
49 ":metric",
50 ],
51)
52
Keir Mierlef4dfd872020-08-12 20:53:26 -070053pw_cc_library(
54 name = "metric_service_nanopb",
Nathaniel Brougha1113be2021-03-07 09:05:41 +080055 srcs = ["metric_service_nanopb.cc"],
Keir Mierlef4dfd872020-08-12 20:53:26 -070056 hdrs = [
57 "public/pw_metric/metric_service_nanopb.h",
58 ],
Keir Mierlef4dfd872020-08-12 20:53:26 -070059 deps = [
60 ":metric",
61 ],
62)
63
Keir Mierle45fa7852020-08-10 21:09:54 -070064pw_cc_test(
65 name = "metric_test",
66 srcs = [
67 "metric_test.cc",
68 ],
69 deps = [
70 ":metric",
71 ],
72)
73
74pw_cc_test(
75 name = "global_test",
76 srcs = [
77 "global_test.cc",
78 ],
79 deps = [
80 ":global",
81 ],
82)
Keir Mierlef4dfd872020-08-12 20:53:26 -070083
84pw_cc_test(
85 name = "metric_service_nanopb_test",
86 srcs = [
87 "metric_service_nanopb_test.cc",
88 ],
89 deps = [
90 ":metric_service_nanopb",
91 ],
92)