1# 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 15include($ENV{PW_ROOT}/pw_build/pigweed.cmake) 16include($ENV{PW_ROOT}/pw_protobuf_compiler/proto.cmake) 17 18pw_add_library(pw_snapshot.uuid STATIC 19 HEADERS 20 public/pw_snapshot/uuid.h 21 PUBLIC_INCLUDES 22 public 23 PUBLIC_DEPS 24 pw_bytes 25 pw_result 26 pw_span 27 SOURCES 28 uuid.cc 29 PRIVATE_DEPS 30 pw_protobuf 31 pw_snapshot.metadata_proto.pwpb 32) 33 34# This proto library only contains the snapshot_metadata.proto. Typically this 35# should be a dependency of snapshot-like protos. 36pw_proto_library(pw_snapshot.metadata_proto 37 SOURCES 38 pw_snapshot_protos/snapshot_metadata.proto 39 STRIP_PREFIX 40 pw_snapshot_protos 41 PREFIX 42 pw_snapshot_metadata_proto 43 DEPS 44 pw_tokenizer.proto 45) 46 47# This proto provides the complete "Snapshot" proto, which depends on various 48# proto libraries throughout Pigweed. This is the proto library to use when 49# building/reading snapshots. 50pw_proto_library(pw_snapshot.snapshot_proto 51 SOURCES 52 pw_snapshot_protos/snapshot.proto 53 DEPS 54 pw_chrono.protos 55 pw_cpu_exception_cortex_m.cpu_state_protos 56 pw_log.protos 57 pw_snapshot.metadata_proto 58 pw_thread.protos 59) 60 61pw_add_test(pw_snapshot.cpp_compile_test 62 SOURCES 63 cpp_compile_test.cc 64 PRIVATE_DEPS 65 pw_protobuf 66 pw_snapshot.snapshot_proto.pwpb 67 GROUPS 68 modules 69 pw_snapshot 70) 71 72pw_add_test(pw_snapshot.uuid_test 73 SOURCES 74 uuid_test.cc 75 PRIVATE_DEPS 76 pw_bytes 77 pw_span 78 pw_protobuf 79 pw_result 80 pw_snapshot.metadata_proto.pwpb 81 pw_snapshot.uuid 82 pw_status 83 GROUPS 84 modules 85 pw_snapshot 86) 87