• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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)
16
17pw_add_library(pw_bytes STATIC
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/suffix.h
24    public/pw_bytes/units.h
25  PUBLIC_INCLUDES
26    public
27  PUBLIC_DEPS
28    pw_bytes.bit
29    pw_containers.iterator
30    pw_polyfill
31    pw_preprocessor
32    pw_span
33    pw_status
34  SOURCES
35    byte_builder.cc
36)
37
38pw_add_library(pw_bytes.alignment STATIC
39  HEADERS
40    public/pw_bytes/alignment.h
41  PUBLIC_INCLUDES
42    public
43  PUBLIC_DEPS
44    pw_assert
45    pw_bytes
46    pw_preprocessor
47  SOURCES
48    alignment.cc
49)
50
51pw_add_library(pw_bytes.bit INTERFACE
52  HEADERS
53    public/pw_bytes/bit.h
54  PUBLIC_INCLUDES
55    public
56  PUBLIC_DEPS
57    pw_third_party.fuchsia.stdcompat
58)
59
60pw_add_test(pw_bytes.alignment_test
61  SOURCES
62    alignment_test.cc
63  PRIVATE_DEPS
64    pw_bytes.alignment
65  GROUPS
66    modules
67    pw_bytes
68)
69
70pw_add_test(pw_bytes.array_test
71  SOURCES
72    array_test.cc
73  PRIVATE_DEPS
74    pw_bytes
75  GROUPS
76    modules
77    pw_bytes
78)
79
80pw_add_test(pw_bytes.bit_test
81  SOURCES
82    bit_test.cc
83  PRIVATE_DEPS
84    pw_bytes.bit
85  GROUPS
86    modules
87    pw_bytes
88)
89
90pw_add_test(pw_bytes.byte_builder_test
91  SOURCES
92    byte_builder_test.cc
93  PRIVATE_DEPS
94    pw_bytes
95  GROUPS
96    modules
97    pw_bytes
98)
99
100pw_add_test(pw_bytes.endian_test
101  SOURCES
102    endian_test.cc
103  PRIVATE_DEPS
104    pw_bytes
105  GROUPS
106    modules
107    pw_bytes
108)
109
110pw_add_test(pw_bytes.suffix_test
111  SOURCES
112    suffix_test.cc
113  PRIVATE_DEPS
114    pw_compilation_testing._pigweed_only_negative_compilation
115    pw_bytes
116  GROUPS
117    modules
118    pw_bytes
119)
120
121pw_add_test(pw_bytes.units_test
122  SOURCES
123    units_test.cc
124  PRIVATE_DEPS
125    pw_bytes
126  GROUPS
127    modules
128    pw_bytes
129)
130