• 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("//build_overrides/build.gni")
6import("//third_party/abseil-cpp/absl.gni")
7
8absl_source_set("hash") {
9  sources = [
10    "internal/hash.cc",
11    "internal/hash.h",
12  ]
13  public = [ "hash.h" ]
14  deps = [
15    ":city",
16    ":low_level_hash",
17    "//third_party/abseil-cpp/absl/base:config",
18    "//third_party/abseil-cpp/absl/base:core_headers",
19    "//third_party/abseil-cpp/absl/base:endian",
20    "//third_party/abseil-cpp/absl/container:fixed_array",
21    "//third_party/abseil-cpp/absl/functional:function_ref",
22    "//third_party/abseil-cpp/absl/meta:type_traits",
23    "//third_party/abseil-cpp/absl/numeric:bits",
24    "//third_party/abseil-cpp/absl/numeric:int128",
25    "//third_party/abseil-cpp/absl/strings",
26    "//third_party/abseil-cpp/absl/types:optional",
27    "//third_party/abseil-cpp/absl/types:variant",
28    "//third_party/abseil-cpp/absl/utility",
29  ]
30}
31
32absl_source_set("hash_testing") {
33  testonly = true
34  public = [ "hash_testing.h" ]
35  deps = [
36    ":spy_hash_state",
37    "//third_party/abseil-cpp/absl/meta:type_traits",
38    "//third_party/abseil-cpp/absl/strings",
39    "//third_party/abseil-cpp/absl/types:variant",
40    "//third_party/googletest:gtest",
41  ]
42}
43
44absl_test("hash_test") {
45  sources = [ "hash_test.cc" ]
46  deps = [
47    ":hash",
48    ":hash_testing",
49    ":spy_hash_state",
50    "//third_party/abseil-cpp/absl/base:core_headers",
51    "//third_party/abseil-cpp/absl/container:btree",
52    "//third_party/abseil-cpp/absl/container:flat_hash_map",
53    "//third_party/abseil-cpp/absl/container:flat_hash_set",
54    "//third_party/abseil-cpp/absl/container:node_hash_map",
55    "//third_party/abseil-cpp/absl/container:node_hash_set",
56    "//third_party/abseil-cpp/absl/meta:type_traits",
57    "//third_party/abseil-cpp/absl/numeric:int128",
58    "//third_party/abseil-cpp/absl/strings:cord_test_helpers",
59  ]
60}
61
62absl_source_set("spy_hash_state") {
63  testonly = true
64  public = [ "internal/spy_hash_state.h" ]
65  deps = [
66    ":hash",
67    "//third_party/abseil-cpp/absl/strings",
68    "//third_party/abseil-cpp/absl/strings:str_format",
69  ]
70  visibility = [ "//third_party/abseil-cpp/absl/*" ]
71}
72
73absl_source_set("city") {
74  public = [ "internal/city.h" ]
75  sources = [ "internal/city.cc" ]
76  deps = [
77    "//third_party/abseil-cpp/absl/base:config",
78    "//third_party/abseil-cpp/absl/base:core_headers",
79    "//third_party/abseil-cpp/absl/base:endian",
80  ]
81}
82
83absl_source_set("low_level_hash") {
84  public = [ "internal/low_level_hash.h" ]
85  sources = [ "internal/low_level_hash.cc" ]
86  deps = [
87    "//third_party/abseil-cpp/absl/base:config",
88    "//third_party/abseil-cpp/absl/base:endian",
89    "//third_party/abseil-cpp/absl/numeric:int128",
90  ]
91  visibility = [ ":*" ]
92}
93
94absl_test("low_level_hash_test") {
95  sources = [ "internal/low_level_hash_test.cc" ]
96  deps = [
97    ":low_level_hash",
98    "//third_party/abseil-cpp/absl/strings",
99  ]
100}
101