• 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_containers INTERFACE
18  PUBLIC_DEPS
19    pw_containers.algorithm
20    pw_containers.flat_map
21    pw_containers.inline_deque
22    pw_containers.inline_queue
23    pw_containers.intrusive_list
24    pw_containers.vector
25)
26
27pw_add_library(pw_containers.algorithm INTERFACE
28  HEADERS
29    public/pw_containers/algorithm.h
30    public/pw_containers/internal/algorithm_internal.h
31  PUBLIC_INCLUDES
32    public
33)
34
35pw_add_library(pw_containers.filtered_view INTERFACE
36  HEADERS
37    public/pw_containers/filtered_view.h
38  PUBLIC_INCLUDES
39    public
40  PUBLIC_DEPS
41    pw_assert
42    pw_preprocessor
43)
44
45pw_add_library(pw_containers.flat_map INTERFACE
46  HEADERS
47    public/pw_containers/flat_map.h
48  PUBLIC_INCLUDES
49    public
50  PUBLIC_DEPS
51    pw_assert.assert
52)
53
54pw_add_library(pw_containers.inline_deque INTERFACE
55  HEADERS
56    public/pw_containers/inline_deque.h
57  PUBLIC_INCLUDES
58    public
59  PUBLIC_DEPS
60    pw_assert.assert
61    pw_containers._raw_storage
62    pw_preprocessor
63    pw_span
64)
65
66pw_add_library(pw_containers.inline_queue INTERFACE
67  HEADERS
68    public/pw_containers/inline_queue.h
69  PUBLIC_INCLUDES
70    public
71  PUBLIC_DEPS
72    pw_containers.inline_deque
73)
74
75pw_add_library(pw_containers.iterator INTERFACE
76  HEADERS
77    public/pw_containers/iterator.h
78  PUBLIC_INCLUDES
79    public
80)
81
82pw_add_library(pw_containers._raw_storage INTERFACE
83  HEADERS
84    public/pw_containers/internal/raw_storage.h
85  PUBLIC_INCLUDES
86    public
87)
88
89pw_add_library(pw_containers._test_helpers STATIC
90  HEADERS
91    pw_containers_private/test_helpers.h
92  SOURCES
93    test_helpers.cc
94)
95
96pw_add_library(pw_containers.to_array INTERFACE
97  HEADERS
98    public/pw_containers/to_array.h
99  PUBLIC_INCLUDES
100    public
101)
102
103pw_add_library(pw_containers.inline_var_len_entry_queue STATIC
104  HEADERS
105    public/pw_containers/inline_var_len_entry_queue.h
106  PUBLIC_INCLUDES
107    public
108  PUBLIC_DEPS
109    pw_containers._raw_storage
110    pw_varint
111  PRIVATE_DEPS
112    pw_assert
113  SOURCES
114    inline_var_len_entry_queue.c
115)
116
117pw_add_library(pw_containers.vector INTERFACE
118  HEADERS
119    public/pw_containers/vector.h
120  PUBLIC_INCLUDES
121    public
122  PUBLIC_DEPS
123    pw_assert
124    pw_preprocessor
125)
126
127pw_add_library(pw_containers.wrapped_iterator INTERFACE
128  HEADERS
129    public/pw_containers/wrapped_iterator.h
130  PUBLIC_INCLUDES
131    public
132)
133
134pw_add_library(pw_containers.intrusive_list STATIC
135  HEADERS
136    public/pw_containers/internal/intrusive_list_impl.h
137    public/pw_containers/intrusive_list.h
138  PUBLIC_INCLUDES
139    public
140  SOURCES
141    intrusive_list.cc
142  PRIVATE_DEPS
143    pw_assert
144)
145
146pw_add_test(pw_containers.algorithm_test
147  SOURCES
148    algorithm_test.cc
149  PRIVATE_DEPS
150    pw_containers.algorithm
151    pw_containers.flat_map
152    pw_containers.intrusive_list
153    pw_containers.vector
154    pw_span
155  GROUPS
156    modules
157    pw_containers
158)
159
160pw_add_test(pw_containers.filtered_view_test
161  SOURCES
162    filtered_view_test.cc
163  PRIVATE_DEPS
164    pw_containers.algorithm
165    pw_containers.filtered_view
166    pw_containers.flat_map
167    pw_containers.intrusive_list
168    pw_span
169  GROUPS
170    modules
171    pw_containers
172)
173
174pw_add_test(pw_containers.flat_map_test
175  SOURCES
176    flat_map_test.cc
177  PRIVATE_DEPS
178    pw_containers.flat_map
179    pw_polyfill
180  GROUPS
181    modules
182    pw_containers
183    pw_polyfill
184)
185
186pw_add_test(pw_containers.inline_deque_test
187  SOURCES
188    inline_deque_test.cc
189  PRIVATE_DEPS
190    pw_compilation_testing._pigweed_only_negative_compilation
191    pw_containers.algorithm
192    pw_containers.inline_deque
193    pw_containers._test_helpers
194  GROUPS
195    modules
196    pw_containers
197)
198
199pw_add_test(pw_containers.inline_queue_test
200  SOURCES
201    inline_queue_test.cc
202  PRIVATE_DEPS
203    pw_compilation_testing._pigweed_only_negative_compilation
204    pw_containers.algorithm
205    pw_containers.inline_queue
206    pw_containers._test_helpers
207  GROUPS
208    modules
209    pw_containers
210)
211
212pw_add_test(pw_containers.raw_storage_test
213  SOURCES
214    raw_storage_test.cc
215  PRIVATE_DEPS
216    pw_containers._raw_storage
217    pw_containers._test_helpers
218  GROUPS
219    modules
220    pw_containers
221)
222
223pw_add_test(pw_containers.to_array_test
224  SOURCES
225    to_array_test.cc
226  PRIVATE_DEPS
227    pw_containers.to_array
228  GROUPS
229    modules
230    pw_containers
231)
232
233pw_add_test(pw_containers.inline_var_len_entry_queue_test
234  SOURCES
235    pw_containers_private/inline_var_len_entry_queue_test_oracle.h
236    inline_var_len_entry_queue_test.cc
237  PRIVATE_DEPS
238    pw_bytes
239    pw_containers.inline_var_len_entry_queue
240)
241
242pw_add_test(pw_containers.vector_test
243  SOURCES
244    vector_test.cc
245  PRIVATE_DEPS
246    pw_compilation_testing._pigweed_only_negative_compilation
247    pw_containers._test_helpers
248    pw_containers.vector
249  GROUPS
250    modules
251    pw_containers
252)
253
254pw_add_test(pw_containers.wrapped_iterator_test
255  SOURCES
256    wrapped_iterator_test.cc
257  PRIVATE_DEPS
258    pw_containers.wrapped_iterator
259  GROUPS
260    modules
261    pw_containers
262)
263
264pw_add_test(pw_containers.intrusive_list_test
265  SOURCES
266    intrusive_list_test.cc
267  PRIVATE_DEPS
268    pw_compilation_testing._pigweed_only_negative_compilation
269    pw_containers.intrusive_list
270    pw_containers.vector
271    pw_preprocessor
272  GROUPS
273    modules
274    pw_containers
275)
276