xref: /aosp_15_r20/external/webrtc/third_party/abseil-cpp/absl/container/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1# Copyright 2018 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//third_party/abseil-cpp/absl.gni")
6
7absl_source_set("compressed_tuple") {
8  public = [ "internal/compressed_tuple.h" ]
9  deps = [ "//third_party/abseil-cpp/absl/utility" ]
10}
11
12absl_source_set("fixed_array") {
13  public = [ "fixed_array.h" ]
14  deps = [
15    ":compressed_tuple",
16    "//third_party/abseil-cpp/absl/algorithm",
17    "//third_party/abseil-cpp/absl/base:config",
18    "//third_party/abseil-cpp/absl/base:core_headers",
19    "//third_party/abseil-cpp/absl/base:dynamic_annotations",
20    "//third_party/abseil-cpp/absl/base:throw_delegate",
21    "//third_party/abseil-cpp/absl/memory",
22  ]
23}
24
25absl_source_set("inlined_vector_internal") {
26  public = [ "internal/inlined_vector.h" ]
27  deps = [
28    ":compressed_tuple",
29    "//third_party/abseil-cpp/absl/base:core_headers",
30    "//third_party/abseil-cpp/absl/memory",
31    "//third_party/abseil-cpp/absl/meta:type_traits",
32    "//third_party/abseil-cpp/absl/types:span",
33  ]
34}
35
36absl_source_set("inlined_vector") {
37  public = [ "inlined_vector.h" ]
38  deps = [
39    ":inlined_vector_internal",
40    "//third_party/abseil-cpp/absl/algorithm",
41    "//third_party/abseil-cpp/absl/base:core_headers",
42    "//third_party/abseil-cpp/absl/base:throw_delegate",
43    "//third_party/abseil-cpp/absl/memory",
44    "//third_party/abseil-cpp/absl/meta:type_traits",
45  ]
46}
47
48absl_source_set("counting_allocator") {
49  testonly = true
50  public = [ "internal/counting_allocator.h" ]
51  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
52  visibility = [ ":*" ]
53}
54
55absl_source_set("test_instance_tracker") {
56  testonly = true
57  sources = [ "internal/test_instance_tracker.cc" ]
58  public = [ "internal/test_instance_tracker.h" ]
59  deps = [ "//third_party/abseil-cpp/absl/types:compare" ]
60  visibility = [ "//third_party/abseil-cpp/absl/*" ]
61}
62
63absl_source_set("flat_hash_map") {
64  public = [ "flat_hash_map.h" ]
65  deps = [
66    ":container_memory",
67    ":hash_function_defaults",
68    ":raw_hash_map",
69    "//third_party/abseil-cpp/absl/algorithm:container",
70    "//third_party/abseil-cpp/absl/base:core_headers",
71    "//third_party/abseil-cpp/absl/memory",
72  ]
73}
74
75absl_source_set("flat_hash_set") {
76  public = [ "flat_hash_set.h" ]
77  deps = [
78    ":container_memory",
79    ":hash_function_defaults",
80    ":raw_hash_set",
81    "//third_party/abseil-cpp/absl/algorithm:container",
82    "//third_party/abseil-cpp/absl/base:core_headers",
83    "//third_party/abseil-cpp/absl/memory",
84  ]
85}
86
87absl_source_set("node_hash_map") {
88  public = [ "node_hash_map.h" ]
89  deps = [
90    ":container_memory",
91    ":hash_function_defaults",
92    ":node_slot_policy",
93    ":raw_hash_map",
94    "//third_party/abseil-cpp/absl/algorithm:container",
95    "//third_party/abseil-cpp/absl/base:core_headers",
96    "//third_party/abseil-cpp/absl/memory",
97  ]
98}
99
100absl_source_set("node_hash_set") {
101  public = [ "node_hash_set.h" ]
102  deps = [
103    ":container_memory",
104    ":hash_function_defaults",
105    ":node_slot_policy",
106    ":raw_hash_set",
107    "//third_party/abseil-cpp/absl/algorithm:container",
108    "//third_party/abseil-cpp/absl/base:core_headers",
109    "//third_party/abseil-cpp/absl/memory",
110  ]
111}
112
113absl_source_set("container_memory") {
114  public = [ "internal/container_memory.h" ]
115  deps = [
116    "//third_party/abseil-cpp/absl/base:config",
117    "//third_party/abseil-cpp/absl/memory",
118    "//third_party/abseil-cpp/absl/meta:type_traits",
119    "//third_party/abseil-cpp/absl/utility",
120  ]
121}
122
123absl_source_set("hash_function_defaults") {
124  public = [ "internal/hash_function_defaults.h" ]
125  deps = [
126    "//third_party/abseil-cpp/absl/base:config",
127    "//third_party/abseil-cpp/absl/hash",
128    "//third_party/abseil-cpp/absl/strings",
129    "//third_party/abseil-cpp/absl/strings:cord",
130  ]
131}
132
133absl_source_set("hash_generator_testing") {
134  testonly = true
135  sources = [ "internal/hash_generator_testing.cc" ]
136  public = [ "internal/hash_generator_testing.h" ]
137  deps = [
138    ":hash_policy_testing",
139    "//third_party/abseil-cpp/absl/memory",
140    "//third_party/abseil-cpp/absl/meta:type_traits",
141    "//third_party/abseil-cpp/absl/strings",
142  ]
143}
144
145absl_source_set("hash_policy_testing") {
146  testonly = true
147  public = [ "internal/hash_policy_testing.h" ]
148  deps = [
149    "//third_party/abseil-cpp/absl/hash",
150    "//third_party/abseil-cpp/absl/strings",
151  ]
152}
153
154absl_source_set("hash_policy_traits") {
155  public = [ "internal/hash_policy_traits.h" ]
156  deps = [
157    ":common_policy_traits",
158    "//third_party/abseil-cpp/absl/meta:type_traits",
159  ]
160}
161
162absl_source_set("common_policy_traits") {
163  public = [ "internal/common_policy_traits.h" ]
164  visibility = [ "//third_party/abseil-cpp/absl/container:*" ]
165  deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
166}
167
168absl_test("common_policy_traits_test") {
169  sources = [ "internal/common_policy_traits_test.cc" ]
170  deps = [ ":common_policy_traits" ]
171}
172
173absl_source_set("hashtable_debug") {
174  public = [ "internal/hashtable_debug.h" ]
175  deps = [ ":hashtable_debug_hooks" ]
176}
177
178absl_source_set("hashtable_debug_hooks") {
179  public = [ "internal/hashtable_debug_hooks.h" ]
180  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
181}
182
183absl_source_set("hashtablez_sampler") {
184  public = [ "internal/hashtablez_sampler.h" ]
185  sources = [
186    "internal/hashtablez_sampler.cc",
187    "internal/hashtablez_sampler_force_weak_definition.cc",
188  ]
189  deps = [
190    "//third_party/abseil-cpp/absl/base",
191    "//third_party/abseil-cpp/absl/base:config",
192    "//third_party/abseil-cpp/absl/base:core_headers",
193    "//third_party/abseil-cpp/absl/debugging:stacktrace",
194    "//third_party/abseil-cpp/absl/memory",
195    "//third_party/abseil-cpp/absl/profiling:exponential_biased",
196    "//third_party/abseil-cpp/absl/profiling:sample_recorder",
197    "//third_party/abseil-cpp/absl/synchronization",
198    "//third_party/abseil-cpp/absl/utility",
199  ]
200}
201
202absl_source_set("node_slot_policy") {
203  public = [ "internal/node_slot_policy.h" ]
204  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
205}
206
207absl_test("node_slot_policy_test") {
208  sources = [ "internal/node_slot_policy_test.cc" ]
209  deps = [
210    ":hash_policy_traits",
211    ":node_slot_policy",
212  ]
213}
214
215absl_source_set("raw_hash_map") {
216  public = [ "internal/raw_hash_map.h" ]
217  deps = [
218    ":container_memory",
219    ":raw_hash_set",
220    "//third_party/abseil-cpp/absl/base:throw_delegate",
221  ]
222}
223
224absl_source_set("common") {
225  public = [ "internal/common.h" ]
226  deps = [
227    "//third_party/abseil-cpp/absl/meta:type_traits",
228    "//third_party/abseil-cpp/absl/types:optional",
229  ]
230}
231
232absl_source_set("raw_hash_set") {
233  sources = [ "internal/raw_hash_set.cc" ]
234  public = [ "internal/raw_hash_set.h" ]
235  deps = [
236    ":common",
237    ":compressed_tuple",
238    ":container_memory",
239    ":hash_policy_traits",
240    ":hashtable_debug_hooks",
241    ":hashtablez_sampler",
242    "//third_party/abseil-cpp/absl/base:config",
243    "//third_party/abseil-cpp/absl/base:core_headers",
244    "//third_party/abseil-cpp/absl/base:endian",
245    "//third_party/abseil-cpp/absl/base:prefetch",
246    "//third_party/abseil-cpp/absl/memory",
247    "//third_party/abseil-cpp/absl/meta:type_traits",
248    "//third_party/abseil-cpp/absl/numeric:bits",
249    "//third_party/abseil-cpp/absl/utility",
250  ]
251}
252
253absl_source_set("layout") {
254  public = [ "internal/layout.h" ]
255  deps = [
256    "//third_party/abseil-cpp/absl/base:config",
257    "//third_party/abseil-cpp/absl/base:core_headers",
258    "//third_party/abseil-cpp/absl/meta:type_traits",
259    "//third_party/abseil-cpp/absl/strings",
260    "//third_party/abseil-cpp/absl/types:span",
261    "//third_party/abseil-cpp/absl/utility",
262  ]
263}
264
265absl_source_set("tracked") {
266  testonly = true
267  public = [ "internal/tracked.h" ]
268  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
269}
270
271absl_source_set("unordered_map_constructor_test") {
272  testonly = true
273  public = [ "internal/unordered_map_constructor_test.h" ]
274  deps = [
275    ":hash_generator_testing",
276    ":hash_policy_testing",
277    "//third_party/googletest:gtest",
278  ]
279}
280
281absl_source_set("unordered_map_lookup_test") {
282  testonly = true
283  public = [ "internal/unordered_map_lookup_test.h" ]
284  deps = [
285    ":hash_generator_testing",
286    ":hash_policy_testing",
287    "//third_party/googletest:gtest",
288  ]
289}
290
291absl_source_set("unordered_map_modifiers_test") {
292  testonly = true
293  public = [ "internal/unordered_map_modifiers_test.h" ]
294  deps = [
295    ":hash_generator_testing",
296    ":hash_policy_testing",
297    "//third_party/googletest:gtest",
298  ]
299}
300
301absl_source_set("unordered_set_constructor_test") {
302  testonly = true
303  public = [ "internal/unordered_set_constructor_test.h" ]
304  deps = [
305    ":hash_generator_testing",
306    ":hash_policy_testing",
307    "//third_party/abseil-cpp/absl/meta:type_traits",
308    "//third_party/googletest:gtest",
309  ]
310}
311
312absl_source_set("unordered_set_members_test") {
313  testonly = true
314  public = [ "internal/unordered_set_members_test.h" ]
315  deps = [
316    "//third_party/abseil-cpp/absl/meta:type_traits",
317    "//third_party/googletest:gtest",
318  ]
319}
320
321absl_source_set("unordered_map_members_test") {
322  testonly = true
323  public = [ "internal/unordered_map_members_test.h" ]
324  deps = [
325    "//third_party/abseil-cpp/absl/meta:type_traits",
326    "//third_party/googletest:gtest",
327  ]
328}
329
330absl_source_set("unordered_set_lookup_test") {
331  testonly = true
332  public = [ "internal/unordered_set_lookup_test.h" ]
333  deps = [
334    ":hash_generator_testing",
335    ":hash_policy_testing",
336    "//third_party/googletest:gtest",
337  ]
338}
339
340absl_source_set("unordered_set_modifiers_test") {
341  testonly = true
342  public = [ "internal/unordered_set_modifiers_test.h" ]
343  deps = [
344    ":hash_generator_testing",
345    ":hash_policy_testing",
346    "//third_party/googletest:gtest",
347  ]
348}
349
350absl_test("sample_element_size_test") {
351  public = [ "sample_element_size_test.cc" ]
352  deps = [
353    ":flat_hash_map",
354    ":flat_hash_set",
355    ":node_hash_map",
356    ":node_hash_set",
357  ]
358}
359
360absl_source_set("btree") {
361  sources = [
362    "internal/btree.h",
363    "internal/btree_container.h",
364  ]
365  public = [
366    "btree_map.h",
367    "btree_set.h",
368  ]
369  deps = [
370    ":common",
371    ":common_policy_traits",
372    ":compressed_tuple",
373    ":container_memory",
374    ":layout",
375    "//third_party/abseil-cpp/absl/base:core_headers",
376    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
377    "//third_party/abseil-cpp/absl/base:throw_delegate",
378    "//third_party/abseil-cpp/absl/memory",
379    "//third_party/abseil-cpp/absl/meta:type_traits",
380    "//third_party/abseil-cpp/absl/strings",
381    "//third_party/abseil-cpp/absl/strings:cord",
382    "//third_party/abseil-cpp/absl/types:compare",
383    "//third_party/abseil-cpp/absl/utility",
384  ]
385}
386
387absl_test("inlined_vector_test") {
388  sources = [ "inlined_vector_test.cc" ]
389  deps = [
390    ":counting_allocator",
391    ":inlined_vector",
392    ":test_instance_tracker",
393    "//third_party/abseil-cpp/absl/base:config",
394    "//third_party/abseil-cpp/absl/base:core_headers",
395    "//third_party/abseil-cpp/absl/base:exception_testing",
396    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
397    "//third_party/abseil-cpp/absl/hash:hash_testing",
398    "//third_party/abseil-cpp/absl/memory",
399    "//third_party/abseil-cpp/absl/strings",
400  ]
401}
402