• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_test("inlined_vector_test") {
56  sources = [ "inlined_vector_test.cc" ]
57  deps = [
58    ":counting_allocator",
59    ":inlined_vector",
60    ":test_instance_tracker",
61    "//third_party/abseil-cpp/absl/base:config",
62    "//third_party/abseil-cpp/absl/base:core_headers",
63    "//third_party/abseil-cpp/absl/base:exception_testing",
64    "//third_party/abseil-cpp/absl/hash:hash_testing",
65    "//third_party/abseil-cpp/absl/log:check",
66    "//third_party/abseil-cpp/absl/memory",
67    "//third_party/abseil-cpp/absl/strings",
68  ]
69}
70
71absl_source_set("test_instance_tracker") {
72  testonly = true
73  sources = [ "internal/test_instance_tracker.cc" ]
74  public = [ "internal/test_instance_tracker.h" ]
75  deps = [ "//third_party/abseil-cpp/absl/types:compare" ]
76  visibility = [ "//third_party/abseil-cpp/absl/*" ]
77}
78
79absl_source_set("flat_hash_map") {
80  public = [ "flat_hash_map.h" ]
81  deps = [
82    ":container_memory",
83    ":hash_function_defaults",
84    ":raw_hash_map",
85    "//third_party/abseil-cpp/absl/algorithm:container",
86    "//third_party/abseil-cpp/absl/base:core_headers",
87    "//third_party/abseil-cpp/absl/memory",
88  ]
89}
90
91absl_source_set("flat_hash_set") {
92  public = [ "flat_hash_set.h" ]
93  deps = [
94    ":container_memory",
95    ":hash_function_defaults",
96    ":raw_hash_set",
97    "//third_party/abseil-cpp/absl/algorithm:container",
98    "//third_party/abseil-cpp/absl/base:core_headers",
99    "//third_party/abseil-cpp/absl/memory",
100  ]
101}
102
103absl_source_set("node_hash_map") {
104  public = [ "node_hash_map.h" ]
105  deps = [
106    ":container_memory",
107    ":hash_function_defaults",
108    ":node_slot_policy",
109    ":raw_hash_map",
110    "//third_party/abseil-cpp/absl/algorithm:container",
111    "//third_party/abseil-cpp/absl/base:core_headers",
112    "//third_party/abseil-cpp/absl/memory",
113  ]
114}
115
116absl_source_set("node_hash_set") {
117  public = [ "node_hash_set.h" ]
118  deps = [
119    ":container_memory",
120    ":hash_function_defaults",
121    ":node_slot_policy",
122    ":raw_hash_set",
123    "//third_party/abseil-cpp/absl/algorithm:container",
124    "//third_party/abseil-cpp/absl/base:core_headers",
125    "//third_party/abseil-cpp/absl/memory",
126  ]
127}
128
129absl_source_set("container_memory") {
130  public = [ "internal/container_memory.h" ]
131  deps = [
132    "//third_party/abseil-cpp/absl/base:config",
133    "//third_party/abseil-cpp/absl/memory",
134    "//third_party/abseil-cpp/absl/meta:type_traits",
135    "//third_party/abseil-cpp/absl/utility",
136  ]
137}
138
139absl_source_set("hash_function_defaults") {
140  public = [ "internal/hash_function_defaults.h" ]
141  visibility = [ "//third_party/abseil-cpp/absl/container:*" ]
142  deps = [
143    "//third_party/abseil-cpp/absl/base:config",
144    "//third_party/abseil-cpp/absl/hash",
145    "//third_party/abseil-cpp/absl/strings",
146    "//third_party/abseil-cpp/absl/strings:string_view",
147    "//third_party/abseil-cpp/absl/strings:cord",
148  ]
149}
150
151absl_source_set("hash_generator_testing") {
152  testonly = true
153  sources = [ "internal/hash_generator_testing.cc" ]
154  public = [ "internal/hash_generator_testing.h" ]
155  deps = [
156    ":hash_policy_testing",
157    "//third_party/abseil-cpp/absl/memory",
158    "//third_party/abseil-cpp/absl/meta:type_traits",
159    "//third_party/abseil-cpp/absl/strings:string_view",
160  ]
161}
162
163absl_source_set("hash_policy_testing") {
164  testonly = true
165  public = [ "internal/hash_policy_testing.h" ]
166  deps = [
167    "//third_party/abseil-cpp/absl/hash",
168    "//third_party/abseil-cpp/absl/strings:string_view",
169  ]
170}
171
172absl_source_set("hash_policy_traits") {
173  public = [ "internal/hash_policy_traits.h" ]
174  deps = [
175    ":common_policy_traits",
176    "//third_party/abseil-cpp/absl/meta:type_traits",
177  ]
178}
179
180absl_source_set("common_policy_traits") {
181  public = [ "internal/common_policy_traits.h" ]
182  visibility = [ "//third_party/abseil-cpp/absl/container:*" ]
183  deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
184}
185
186absl_test("common_policy_traits_test") {
187  sources = [ "internal/common_policy_traits_test.cc" ]
188  deps = [ ":common_policy_traits" ]
189}
190
191absl_source_set("hashtable_debug") {
192  public = [ "internal/hashtable_debug.h" ]
193  deps = [ ":hashtable_debug_hooks" ]
194}
195
196absl_source_set("hashtable_debug_hooks") {
197  public = [ "internal/hashtable_debug_hooks.h" ]
198  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
199}
200
201absl_source_set("hashtablez_sampler") {
202  public = [ "internal/hashtablez_sampler.h" ]
203  sources = [
204    "internal/hashtablez_sampler.cc",
205    "internal/hashtablez_sampler_force_weak_definition.cc",
206  ]
207  deps = [
208    "//third_party/abseil-cpp/absl/base",
209    "//third_party/abseil-cpp/absl/base:config",
210    "//third_party/abseil-cpp/absl/base:core_headers",
211    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
212    "//third_party/abseil-cpp/absl/debugging:stacktrace",
213    "//third_party/abseil-cpp/absl/memory",
214    "//third_party/abseil-cpp/absl/profiling:exponential_biased",
215    "//third_party/abseil-cpp/absl/profiling:sample_recorder",
216    "//third_party/abseil-cpp/absl/synchronization",
217    "//third_party/abseil-cpp/absl/time",
218    "//third_party/abseil-cpp/absl/utility",
219  ]
220}
221
222absl_source_set("node_slot_policy") {
223  public = [ "internal/node_slot_policy.h" ]
224  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
225}
226
227absl_test("node_slot_policy_test") {
228  sources = [ "internal/node_slot_policy_test.cc" ]
229  deps = [
230    ":hash_policy_traits",
231    ":node_slot_policy",
232  ]
233}
234
235absl_source_set("raw_hash_map") {
236  public = [ "internal/raw_hash_map.h" ]
237  deps = [
238    ":container_memory",
239    ":raw_hash_set",
240    "//third_party/abseil-cpp/absl/base:throw_delegate",
241  ]
242}
243
244absl_source_set("common") {
245  public = [ "internal/common.h" ]
246  deps = [
247    "//third_party/abseil-cpp/absl/meta:type_traits",
248    "//third_party/abseil-cpp/absl/types:optional",
249  ]
250}
251
252absl_source_set("raw_hash_set") {
253  sources = [ "internal/raw_hash_set.cc" ]
254  public = [ "internal/raw_hash_set.h" ]
255  deps = [
256    ":common",
257    ":compressed_tuple",
258    ":container_memory",
259    ":hash_policy_traits",
260    ":hashtable_debug_hooks",
261    ":hashtablez_sampler",
262    "//third_party/abseil-cpp/absl/base:config",
263    "//third_party/abseil-cpp/absl/base:core_headers",
264    "//third_party/abseil-cpp/absl/base:dynamic_annotations",
265    "//third_party/abseil-cpp/absl/base:endian",
266    "//third_party/abseil-cpp/absl/base:prefetch",
267    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
268    "//third_party/abseil-cpp/absl/hash",
269    "//third_party/abseil-cpp/absl/memory",
270    "//third_party/abseil-cpp/absl/meta:type_traits",
271    "//third_party/abseil-cpp/absl/numeric:bits",
272    "//third_party/abseil-cpp/absl/utility",
273  ]
274}
275
276absl_source_set("layout") {
277  public = [ "internal/layout.h" ]
278  deps = [
279    "//third_party/abseil-cpp/absl/base:config",
280    "//third_party/abseil-cpp/absl/base:core_headers",
281    "//third_party/abseil-cpp/absl/meta:type_traits",
282    "//third_party/abseil-cpp/absl/strings",
283    "//third_party/abseil-cpp/absl/types:span",
284    "//third_party/abseil-cpp/absl/utility",
285  ]
286}
287
288absl_source_set("tracked") {
289  testonly = true
290  public = [ "internal/tracked.h" ]
291  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
292}
293
294absl_source_set("unordered_map_constructor_test") {
295  testonly = true
296  public = [ "internal/unordered_map_constructor_test.h" ]
297  deps = [
298    ":hash_generator_testing",
299    ":hash_policy_testing",
300    "//third_party/googletest:gtest",
301  ]
302}
303
304absl_source_set("unordered_map_lookup_test") {
305  testonly = true
306  public = [ "internal/unordered_map_lookup_test.h" ]
307  deps = [
308    ":hash_generator_testing",
309    ":hash_policy_testing",
310    "//third_party/googletest:gtest",
311  ]
312}
313
314absl_source_set("unordered_map_modifiers_test") {
315  testonly = true
316  public = [ "internal/unordered_map_modifiers_test.h" ]
317  deps = [
318    ":hash_generator_testing",
319    ":hash_policy_testing",
320    "//third_party/googletest:gtest",
321  ]
322}
323
324absl_source_set("unordered_set_constructor_test") {
325  testonly = true
326  public = [ "internal/unordered_set_constructor_test.h" ]
327  deps = [
328    ":hash_generator_testing",
329    ":hash_policy_testing",
330    "//third_party/abseil-cpp/absl/meta:type_traits",
331    "//third_party/googletest:gtest",
332  ]
333}
334
335absl_source_set("unordered_set_members_test") {
336  testonly = true
337  public = [ "internal/unordered_set_members_test.h" ]
338  deps = [
339    "//third_party/abseil-cpp/absl/meta:type_traits",
340    "//third_party/googletest:gtest",
341  ]
342}
343
344absl_source_set("unordered_map_members_test") {
345  testonly = true
346  public = [ "internal/unordered_map_members_test.h" ]
347  deps = [
348    "//third_party/abseil-cpp/absl/meta:type_traits",
349    "//third_party/googletest:gtest",
350  ]
351}
352
353absl_source_set("unordered_set_lookup_test") {
354  testonly = true
355  public = [ "internal/unordered_set_lookup_test.h" ]
356  deps = [
357    ":hash_generator_testing",
358    ":hash_policy_testing",
359    "//third_party/googletest:gtest",
360  ]
361}
362
363absl_source_set("unordered_set_modifiers_test") {
364  testonly = true
365  public = [ "internal/unordered_set_modifiers_test.h" ]
366  deps = [
367    ":hash_generator_testing",
368    ":hash_policy_testing",
369    "//third_party/googletest:gtest",
370  ]
371}
372
373absl_test("sample_element_size_test") {
374  public = [ "sample_element_size_test.cc" ]
375  deps = [
376    ":flat_hash_map",
377    ":flat_hash_set",
378    ":node_hash_map",
379    ":node_hash_set",
380  ]
381}
382
383absl_source_set("btree") {
384  sources = [
385    "internal/btree.h",
386    "internal/btree_container.h",
387  ]
388  public = [
389    "btree_map.h",
390    "btree_set.h",
391  ]
392  deps = [
393    ":common",
394    ":common_policy_traits",
395    ":compressed_tuple",
396    ":container_memory",
397    ":layout",
398    "//third_party/abseil-cpp/absl/base:core_headers",
399    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
400    "//third_party/abseil-cpp/absl/base:throw_delegate",
401    "//third_party/abseil-cpp/absl/memory",
402    "//third_party/abseil-cpp/absl/meta:type_traits",
403    "//third_party/abseil-cpp/absl/strings:cord",
404    "//third_party/abseil-cpp/absl/strings:string_view",
405    "//third_party/abseil-cpp/absl/types:compare",
406    "//third_party/abseil-cpp/absl/utility",
407  ]
408}
409
410absl_source_set("btree_test_common") {
411  testonly = true
412  public = [
413    "btree_test.h",
414  ]
415  deps = [
416    ":btree",
417    ":flat_hash_set",
418    "//third_party/abseil-cpp/absl/strings",
419    "//third_party/abseil-cpp/absl/strings:cord",
420    "//third_party/abseil-cpp/absl/time",
421  ]
422}
423
424# TODO(mbonadei): Fix issue with EXPECT_DEATH and uncomment.
425# absl_test("btree_test") {
426#   sources = [ "btree_test.cc" ]
427#   deps = [
428#     ":btree",
429#     ":btree_test_common",
430#     ":counting_allocator",
431#     ":test_instance_tracker",
432#     "//third_party/abseil-cpp/absl/algorithm:container",
433#     "//third_party/abseil-cpp/absl/base:core_headers",
434#     "//third_party/abseil-cpp/absl/base:raw_logging_internal",
435#     "//third_party/abseil-cpp/absl/flags:flag",
436#     "//third_party/abseil-cpp/absl/hash:hash_testing",
437#     "//third_party/abseil-cpp/absl/memory",
438#     "//third_party/abseil-cpp/absl/random",
439#     "//third_party/abseil-cpp/absl/strings",
440#     "//third_party/abseil-cpp/absl/types:compare",
441#     "//third_party/abseil-cpp/absl/types:optional",
442#   ]
443# }
444