blob: 1ba335551af92520d4415c75591522204afda88a [file] [log] [blame]
Ewout van Bekkumc5c8b272022-01-26 16:23:08 -08001# 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_module_library(pw_snapshot.uuid
19 HEADERS
20 public/pw_snapshot/uuid.h
21 PUBLIC_INCLUDES
22 public
23 PUBLIC_DEPS
24 pw_polyfill.span
25 pw_polyfill.cstddef
26 pw_result
27 pw_bytes
28 SOURCES
29 uuid.cc
30 PRIVATE_DEPS
31 pw_protobuf
32 pw_snapshot.metadata_proto.pwpb
33)
34
35pw_add_module_library(pw_snapshot
36 PUBLIC_DEPS
37 pw_snapshot.metadata_proto
38 pw_snapshot.snapshot_proto
39)
40
41# This proto library only contains the snapshot_metadata.proto. Typically this
42# should be a dependency of snapshot-like protos.
43pw_proto_library(pw_snapshot.metadata_proto
44 SOURCES
45 pw_snapshot_protos/snapshot_metadata.proto
46 STRIP_PREFIX
47 pw_snapshot_protos
48 PREFIX
49 pw_snapshot_metadata_proto
50 DEPS
51 pw_tokenizer.proto
52)
53
54# This proto provides the complete "Snapshot" proto, which depends on various
55# proto libraries throughout Pigweed. This is the proto library to use when
56# building/reading snapshots.
57pw_proto_library(pw_snapshot.snapshot_proto
58 SOURCES
59 pw_snapshot_protos/snapshot.proto
60 DEPS
61 pw_snapshot.metadata_proto
62 pw_cpu_exception_cortex_m.cpu_state_protos
63 pw_log.protos
64 pw_thread.protos
65)
66
67pw_add_test(pw_snapshot.cpp_compile_test
68 SOURCES
69 cpp_compile_test.cc
70 DEPS
71 pw_protobuf
72 pw_snapshot.snapshot_proto.pwpb
73 GROUPS
74 modules
75 pw_snapshot
76)
77
78pw_add_test(pw_snapshot.uuid_test
79 SOURCES
80 uuid_test.cc
81 DEPS
82 pw_bytes
83 pw_polyfill.cstddef
84 pw_polyfill.span
85 pw_protobuf
86 pw_result
87 pw_snapshot.metadata_proto.pwpb
88 pw_snapshot.uuid
89 pw_status
90 GROUPS
91 modules
92 pw_snapshot
93)