blob: 17033868ad9089de7ae025f72801b1368d5b916d [file] [log] [blame]
shaneajg9c19db42020-06-11 15:49:51 -04001# 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
Wyatt Hepler0a6f7632020-10-29 09:08:19 -070015include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
Ewout van Bekkum984921a2022-01-20 08:13:54 -080017pw_add_module_library(pw_bytes
18 HEADERS
19 public/pw_bytes/array.h
20 public/pw_bytes/byte_builder.h
21 public/pw_bytes/endian.h
22 public/pw_bytes/span.h
23 public/pw_bytes/units.h
24 PUBLIC_INCLUDES
25 public
shaneajg9c19db42020-06-11 15:49:51 -040026 PUBLIC_DEPS
Ewout van Bekkum984921a2022-01-20 08:13:54 -080027 pw_polyfill
28 pw_polyfill.cstddef
29 pw_polyfill.span
shaneajg9c19db42020-06-11 15:49:51 -040030 pw_preprocessor
shaneajg9c19db42020-06-11 15:49:51 -040031 pw_status
Ewout van Bekkum984921a2022-01-20 08:13:54 -080032 SOURCES
33 byte_builder.cc
shaneajg9c19db42020-06-11 15:49:51 -040034)
Yuval Peressb8f3ad22021-10-26 22:55:27 -060035if(Zephyr_FOUND AND CONFIG_PIGWEED_BYTES)
36 zephyr_link_libraries(pw_bytes)
37endif()
Ewout van Bekkum984921a2022-01-20 08:13:54 -080038
39pw_add_test(pw_bytes.array_test
40 SOURCES
41 array_test.cc
42 DEPS
43 pw_bytes
44 GROUPS
45 modules
46 pw_bytes
47)
48
49pw_add_test(pw_bytes.byte_builder_test
50 SOURCES
51 byte_builder_test.cc
52 DEPS
53 pw_bytes
54 GROUPS
55 modules
56 pw_bytes
57)
58
59pw_add_test(pw_bytes.endian_test
60 SOURCES
61 endian_test.cc
62 DEPS
63 pw_bytes
64 GROUPS
65 modules
66 pw_bytes
67)
68
69pw_add_test(pw_bytes.units_test
70 SOURCES
71 units_test.cc
72 DEPS
73 pw_bytes
74 GROUPS
75 modules
76 pw_bytes
77)