1# Copyright 2022 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 15include($ENV{PW_ROOT}/pw_build/pigweed.cmake) 16 17pw_add_library(pw_metric STATIC 18 HEADERS 19 public/pw_metric/metric.h 20 PUBLIC_INCLUDES 21 public 22 PUBLIC_DEPS 23 pw_tokenizer.base64 24 pw_assert 25 pw_containers 26 pw_log 27 pw_tokenizer 28 SOURCES 29 metric.cc 30 PRIVATE_DEPS 31 pw_span 32) 33 34pw_add_library(pw_metric.global STATIC 35 HEADERS 36 public/pw_metric/global.h 37 PUBLIC_INCLUDES 38 public 39 PUBLIC_DEPS 40 pw_metric 41 pw_tokenizer 42 SOURCES 43 global.cc 44) 45 46pw_proto_library(pw_metric.metric_service_proto 47 SOURCES 48 pw_metric_proto/metric_service.proto 49 INPUTS 50 pw_metric_proto/metric_service.options 51) 52 53pw_add_library(pw_metric.metric_walker INTERFACE 54 HEADERS 55 pw_metric_private/metric_walker.h 56 PUBLIC_DEPS 57 pw_metric 58 pw_assert 59 pw_containers 60 pw_status 61 pw_tokenizer 62) 63 64pw_add_library(pw_metric.metric_service_pwpb STATIC 65 HEADERS 66 public/pw_metric/metric_service_pwpb.h 67 PUBLIC_INCLUDES 68 public 69 PUBLIC_DEPS 70 pw_metric.metric_service_proto.pwpb_rpc 71 pw_metric.metric_service_proto.raw_rpc 72 pw_metric.metric_walker 73 pw_metric 74 pw_bytes 75 pw_containers 76 pw_rpc.raw.server_api 77 SOURCES 78 metric_service_pwpb.cc 79) 80 81pw_add_test(pw_metric.metric_test 82 SOURCES 83 metric_test.cc 84 PRIVATE_DEPS 85 pw_metric 86 GROUPS 87 modules 88 pw_metric 89) 90 91pw_add_test(pw_metric.global_test 92 SOURCES 93 global_test.cc 94 PRIVATE_DEPS 95 pw_metric.global 96 GROUPS 97 modules 98 pw_metric 99) 100