• 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_module_library(pw_containers
18  PUBLIC_DEPS
19    pw_containers.flat_map
20    pw_containers.intrusive_list
21    pw_containers.vector
22)
23if(Zephyr_FOUND AND CONFIG_PIGWEED_CONTAINERS)
24  zephyr_link_libraries(pw_containers)
25endif()
26
27pw_add_module_library(pw_containers.filtered_view
28  HEADERS
29    public/pw_containers/filtered_view.h
30  PUBLIC_INCLUDES
31    public
32)
33
34pw_add_module_library(pw_containers.flat_map
35  HEADERS
36    public/pw_containers/flat_map.h
37  PUBLIC_INCLUDES
38    public
39)
40
41pw_add_module_library(pw_containers.to_array
42  HEADERS
43    public/pw_containers/to_array.h
44  PUBLIC_INCLUDES
45    public
46)
47
48pw_add_module_library(pw_containers.vector
49  HEADERS
50    public/pw_containers/vector.h
51  PUBLIC_INCLUDES
52    public
53  PUBLIC_DEPS
54    pw_assert
55)
56
57pw_add_module_library(pw_containers.wrapped_iterator
58  HEADERS
59    public/pw_containers/wrapped_iterator.h
60  PUBLIC_INCLUDES
61    public
62)
63
64pw_add_module_library(pw_containers.intrusive_list
65  HEADERS
66    public/pw_containers/internal/intrusive_list_impl.h
67    public/pw_containers/intrusive_list.h
68  PUBLIC_INCLUDES
69    public
70  SOURCES
71    intrusive_list.cc
72  PRIVATE_DEPS
73    pw_assert
74)
75
76pw_add_test(pw_containers.filtered_view_test
77  SOURCES
78    filtered_view_test.cc
79  DEPS
80    pw_containers.filtered_view
81    pw_containers.intrusive_list
82    pw_polyfill.span
83  GROUPS
84    modules
85    pw_containers
86)
87
88pw_add_test(pw_containers.flat_map_test
89  SOURCES
90    flat_map_test.cc
91  DEPS
92    pw_containers.flat_map
93  GROUPS
94    modules
95    pw_containers
96)
97
98pw_add_test(pw_containers.to_array_test
99  SOURCES
100    to_array_test.cc
101  DEPS
102    pw_containers.to_array
103  GROUPS
104    modules
105    pw_containers
106)
107
108pw_add_test(pw_containers.vector_test
109  SOURCES
110    vector_test.cc
111  DEPS
112    pw_containers.vector
113  GROUPS
114    modules
115    pw_containers
116)
117
118pw_add_test(pw_containers.wrapped_iterator_test
119  SOURCES
120    wrapped_iterator_test.cc
121  DEPS
122    pw_containers.wrapped_iterator
123  GROUPS
124    modules
125    pw_containers
126)
127
128pw_add_test(pw_containers.intrusive_list_test
129  SOURCES
130    intrusive_list_test.cc
131  DEPS
132    pw_containers.intrusive_list
133    pw_preprocessor
134  GROUPS
135    modules
136    pw_containers
137)
138