xref: /aosp_15_r20/external/pigweed/pw_bytes/CMakeLists.txt (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Copyright 2020 The Pigweed Authors
2*61c4878aSAndroid Build Coastguard Worker#
3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of
5*61c4878aSAndroid Build Coastguard Worker# the License at
6*61c4878aSAndroid Build Coastguard Worker#
7*61c4878aSAndroid Build Coastguard Worker#     https://www.apache.org/licenses/LICENSE-2.0
8*61c4878aSAndroid Build Coastguard Worker#
9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under
13*61c4878aSAndroid Build Coastguard Worker# the License.
14*61c4878aSAndroid Build Coastguard Worker
15*61c4878aSAndroid Build Coastguard Workerinclude($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16*61c4878aSAndroid Build Coastguard Worker
17*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_bytes STATIC
18*61c4878aSAndroid Build Coastguard Worker  HEADERS
19*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/array.h
20*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/byte_builder.h
21*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/endian.h
22*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/span.h
23*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/suffix.h
24*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/units.h
25*61c4878aSAndroid Build Coastguard Worker  PUBLIC_INCLUDES
26*61c4878aSAndroid Build Coastguard Worker    public
27*61c4878aSAndroid Build Coastguard Worker  PUBLIC_DEPS
28*61c4878aSAndroid Build Coastguard Worker    pw_bytes.bit
29*61c4878aSAndroid Build Coastguard Worker    pw_containers.iterator
30*61c4878aSAndroid Build Coastguard Worker    pw_polyfill
31*61c4878aSAndroid Build Coastguard Worker    pw_preprocessor
32*61c4878aSAndroid Build Coastguard Worker    pw_span
33*61c4878aSAndroid Build Coastguard Worker    pw_status
34*61c4878aSAndroid Build Coastguard Worker  SOURCES
35*61c4878aSAndroid Build Coastguard Worker    byte_builder.cc
36*61c4878aSAndroid Build Coastguard Worker)
37*61c4878aSAndroid Build Coastguard Worker
38*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_bytes.alignment STATIC
39*61c4878aSAndroid Build Coastguard Worker  HEADERS
40*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/alignment.h
41*61c4878aSAndroid Build Coastguard Worker  PUBLIC_INCLUDES
42*61c4878aSAndroid Build Coastguard Worker    public
43*61c4878aSAndroid Build Coastguard Worker  PUBLIC_DEPS
44*61c4878aSAndroid Build Coastguard Worker    pw_assert
45*61c4878aSAndroid Build Coastguard Worker    pw_bytes
46*61c4878aSAndroid Build Coastguard Worker    pw_preprocessor
47*61c4878aSAndroid Build Coastguard Worker    pw_third_party.fuchsia.stdcompat
48*61c4878aSAndroid Build Coastguard Worker  SOURCES
49*61c4878aSAndroid Build Coastguard Worker    alignment.cc
50*61c4878aSAndroid Build Coastguard Worker)
51*61c4878aSAndroid Build Coastguard Worker
52*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_bytes.bit INTERFACE
53*61c4878aSAndroid Build Coastguard Worker  HEADERS
54*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/bit.h
55*61c4878aSAndroid Build Coastguard Worker  PUBLIC_INCLUDES
56*61c4878aSAndroid Build Coastguard Worker    public
57*61c4878aSAndroid Build Coastguard Worker  PUBLIC_DEPS
58*61c4878aSAndroid Build Coastguard Worker    pw_third_party.fuchsia.stdcompat
59*61c4878aSAndroid Build Coastguard Worker)
60*61c4878aSAndroid Build Coastguard Worker
61*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_bytes.packed_ptr INTERFACE
62*61c4878aSAndroid Build Coastguard Worker  HEADERS
63*61c4878aSAndroid Build Coastguard Worker    public/pw_bytes/packed_ptr.h
64*61c4878aSAndroid Build Coastguard Worker  PUBLIC_INCLUDES
65*61c4878aSAndroid Build Coastguard Worker    public
66*61c4878aSAndroid Build Coastguard Worker  PUBLIC_DEPS
67*61c4878aSAndroid Build Coastguard Worker    pw_assert
68*61c4878aSAndroid Build Coastguard Worker    pw_third_party.fuchsia.stdcompat
69*61c4878aSAndroid Build Coastguard Worker)
70*61c4878aSAndroid Build Coastguard Worker
71*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.alignment_test
72*61c4878aSAndroid Build Coastguard Worker  SOURCES
73*61c4878aSAndroid Build Coastguard Worker    alignment_test.cc
74*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
75*61c4878aSAndroid Build Coastguard Worker    pw_bytes.alignment
76*61c4878aSAndroid Build Coastguard Worker  GROUPS
77*61c4878aSAndroid Build Coastguard Worker    modules
78*61c4878aSAndroid Build Coastguard Worker    pw_bytes
79*61c4878aSAndroid Build Coastguard Worker)
80*61c4878aSAndroid Build Coastguard Worker
81*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.array_test
82*61c4878aSAndroid Build Coastguard Worker  SOURCES
83*61c4878aSAndroid Build Coastguard Worker    array_test.cc
84*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
85*61c4878aSAndroid Build Coastguard Worker    pw_bytes
86*61c4878aSAndroid Build Coastguard Worker  GROUPS
87*61c4878aSAndroid Build Coastguard Worker    modules
88*61c4878aSAndroid Build Coastguard Worker    pw_bytes
89*61c4878aSAndroid Build Coastguard Worker)
90*61c4878aSAndroid Build Coastguard Worker
91*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.bit_test
92*61c4878aSAndroid Build Coastguard Worker  SOURCES
93*61c4878aSAndroid Build Coastguard Worker    bit_test.cc
94*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
95*61c4878aSAndroid Build Coastguard Worker    pw_bytes.bit
96*61c4878aSAndroid Build Coastguard Worker  GROUPS
97*61c4878aSAndroid Build Coastguard Worker    modules
98*61c4878aSAndroid Build Coastguard Worker    pw_bytes
99*61c4878aSAndroid Build Coastguard Worker)
100*61c4878aSAndroid Build Coastguard Worker
101*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.byte_builder_test
102*61c4878aSAndroid Build Coastguard Worker  SOURCES
103*61c4878aSAndroid Build Coastguard Worker    byte_builder_test.cc
104*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
105*61c4878aSAndroid Build Coastguard Worker    pw_bytes
106*61c4878aSAndroid Build Coastguard Worker  GROUPS
107*61c4878aSAndroid Build Coastguard Worker    modules
108*61c4878aSAndroid Build Coastguard Worker    pw_bytes
109*61c4878aSAndroid Build Coastguard Worker)
110*61c4878aSAndroid Build Coastguard Worker
111*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.endian_test
112*61c4878aSAndroid Build Coastguard Worker  SOURCES
113*61c4878aSAndroid Build Coastguard Worker    endian_test.cc
114*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
115*61c4878aSAndroid Build Coastguard Worker    pw_bytes
116*61c4878aSAndroid Build Coastguard Worker  GROUPS
117*61c4878aSAndroid Build Coastguard Worker    modules
118*61c4878aSAndroid Build Coastguard Worker    pw_bytes
119*61c4878aSAndroid Build Coastguard Worker)
120*61c4878aSAndroid Build Coastguard Worker
121*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.packed_ptr_test
122*61c4878aSAndroid Build Coastguard Worker  SOURCES
123*61c4878aSAndroid Build Coastguard Worker    packed_ptr_test.cc
124*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
125*61c4878aSAndroid Build Coastguard Worker    pw_compilation_testing._pigweed_only_negative_compilation
126*61c4878aSAndroid Build Coastguard Worker    pw_bytes.packed_ptr
127*61c4878aSAndroid Build Coastguard Worker  GROUPS
128*61c4878aSAndroid Build Coastguard Worker    modules
129*61c4878aSAndroid Build Coastguard Worker    pw_bytes
130*61c4878aSAndroid Build Coastguard Worker)
131*61c4878aSAndroid Build Coastguard Worker
132*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.suffix_test
133*61c4878aSAndroid Build Coastguard Worker  SOURCES
134*61c4878aSAndroid Build Coastguard Worker    suffix_test.cc
135*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
136*61c4878aSAndroid Build Coastguard Worker    pw_compilation_testing._pigweed_only_negative_compilation
137*61c4878aSAndroid Build Coastguard Worker    pw_bytes
138*61c4878aSAndroid Build Coastguard Worker  GROUPS
139*61c4878aSAndroid Build Coastguard Worker    modules
140*61c4878aSAndroid Build Coastguard Worker    pw_bytes
141*61c4878aSAndroid Build Coastguard Worker)
142*61c4878aSAndroid Build Coastguard Worker
143*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_bytes.units_test
144*61c4878aSAndroid Build Coastguard Worker  SOURCES
145*61c4878aSAndroid Build Coastguard Worker    units_test.cc
146*61c4878aSAndroid Build Coastguard Worker  PRIVATE_DEPS
147*61c4878aSAndroid Build Coastguard Worker    pw_bytes
148*61c4878aSAndroid Build Coastguard Worker  GROUPS
149*61c4878aSAndroid Build Coastguard Worker    modules
150*61c4878aSAndroid Build Coastguard Worker    pw_bytes
151*61c4878aSAndroid Build Coastguard Worker)
152