• 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
15load(
16    "//pw_build:pigweed.bzl",
17    "pw_cc_library",
18    "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25pw_cc_library(
26    name = "pw_containers",
27    deps = [
28        ":algorithm",
29        ":flat_map",
30        ":intrusive_list",
31        ":vector",
32    ],
33)
34
35pw_cc_library(
36    name = "algorithm",
37    hdrs = [
38        "public/pw_containers/algorithm.h",
39        "public/pw_containers/internal/algorithm_internal.h",
40    ],
41    includes = ["public"],
42)
43
44pw_cc_library(
45    name = "intrusive_list",
46    srcs = [
47        "intrusive_list.cc",
48        "public/pw_containers/internal/intrusive_list_impl.h",
49    ],
50    hdrs = [
51        "public/pw_containers/intrusive_list.h",
52    ],
53    includes = ["public"],
54    deps = [
55        "//pw_assert",
56        "//pw_compilation_testing:negative_compilation_testing",
57    ],
58)
59
60pw_cc_library(
61    name = "iterator",
62    hdrs = ["public/pw_containers/iterator.h"],
63    includes = ["public"],
64)
65
66pw_cc_library(
67    name = "vector",
68    hdrs = [
69        "public/pw_containers/vector.h",
70    ],
71    includes = ["public"],
72    deps = [
73        "//pw_assert:facade",
74        "//pw_polyfill",
75    ],
76)
77
78pw_cc_library(
79    name = "filtered_view",
80    hdrs = ["public/pw_containers/filtered_view.h"],
81    includes = ["public"],
82    deps = [
83        "//pw_assert",
84        "//pw_containers",
85    ],
86)
87
88pw_cc_library(
89    name = "flat_map",
90    hdrs = ["public/pw_containers/flat_map.h"],
91    includes = ["public"],
92)
93
94pw_cc_library(
95    name = "to_array",
96    hdrs = ["public/pw_containers/to_array.h"],
97    includes = ["public"],
98)
99
100pw_cc_library(
101    name = "wrapped_iterator",
102    hdrs = ["public/pw_containers/wrapped_iterator.h"],
103    includes = ["public"],
104)
105
106pw_cc_test(
107    name = "algorithm_test",
108    srcs = ["algorithm_test.cc"],
109    deps = [
110        ":algorithm",
111        ":intrusive_list",
112        ":vector",
113        "//pw_span",
114    ],
115)
116
117pw_cc_test(
118    name = "filtered_view_test",
119    srcs = ["filtered_view_test.cc"],
120    deps = [
121        ":filtered_view",
122        ":intrusive_list",
123    ],
124)
125
126pw_cc_test(
127    name = "flat_map_test",
128    srcs = [
129        "flat_map_test.cc",
130    ],
131    deps = [
132        ":pw_containers",
133        "//pw_unit_test",
134    ],
135)
136
137pw_cc_test(
138    name = "vector_test",
139    srcs = [
140        "vector_test.cc",
141    ],
142    deps = [
143        ":pw_containers",
144        "//pw_unit_test",
145    ],
146)
147
148pw_cc_test(
149    name = "to_array_test",
150    srcs = ["to_array_test.cc"],
151    deps = [":to_array"],
152)
153
154pw_cc_test(
155    name = "wrapped_iterator_test",
156    srcs = ["wrapped_iterator_test.cc"],
157    deps = [":wrapped_iterator"],
158)
159
160pw_cc_test(
161    name = "intrusive_list_test",
162    srcs = [
163        "intrusive_list_test.cc",
164    ],
165    deps = [
166        ":intrusive_list",
167        "//pw_unit_test",
168    ],
169)
170