aboutsummaryrefslogtreecommitdiff
path: root/third_party/abseil-cpp/absl/hash/BUILD.gn
blob: 2170f4e806fdd4369598ebf74022ff150302aab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build_overrides/build.gni")
import("//third_party/abseil-cpp/absl.gni")

absl_source_set("hash") {
  sources = [
    "internal/hash.cc",
    "internal/hash.h",
  ]
  public = [ "hash.h" ]
  deps = [
    ":city",
    ":low_level_hash",
    "//third_party/abseil-cpp/absl/base:config",
    "//third_party/abseil-cpp/absl/base:core_headers",
    "//third_party/abseil-cpp/absl/base:endian",
    "//third_party/abseil-cpp/absl/container:fixed_array",
    "//third_party/abseil-cpp/absl/functional:function_ref",
    "//third_party/abseil-cpp/absl/meta:type_traits",
    "//third_party/abseil-cpp/absl/numeric:int128",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:optional",
    "//third_party/abseil-cpp/absl/types:variant",
    "//third_party/abseil-cpp/absl/utility",
  ]
}

absl_source_set("hash_testing") {
  testonly = true
  public = [ "hash_testing.h" ]
  deps = [
    ":spy_hash_state",
    "//third_party/abseil-cpp/absl/meta:type_traits",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/types:variant",
    "//third_party/googletest:gtest",
  ]
}

absl_test("hash_test") {
  sources = [ "hash_test.cc" ]
  deps = [
    ":hash",
    ":hash_testing",
    ":spy_hash_state",
    "//third_party/abseil-cpp/absl/base:core_headers",
    "//third_party/abseil-cpp/absl/container:btree",
    "//third_party/abseil-cpp/absl/container:flat_hash_map",
    "//third_party/abseil-cpp/absl/container:flat_hash_set",
    "//third_party/abseil-cpp/absl/container:node_hash_map",
    "//third_party/abseil-cpp/absl/container:node_hash_set",
    "//third_party/abseil-cpp/absl/meta:type_traits",
    "//third_party/abseil-cpp/absl/numeric:int128",
    "//third_party/abseil-cpp/absl/strings:cord_test_helpers",
  ]
}

absl_source_set("spy_hash_state") {
  testonly = true
  public = [ "internal/spy_hash_state.h" ]
  deps = [
    ":hash",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/abseil-cpp/absl/strings:str_format",
  ]
  visibility = [ "//third_party/abseil-cpp/absl/*" ]
}

absl_source_set("city") {
  public = [ "internal/city.h" ]
  sources = [ "internal/city.cc" ]
  deps = [
    "//third_party/abseil-cpp/absl/base:config",
    "//third_party/abseil-cpp/absl/base:core_headers",
    "//third_party/abseil-cpp/absl/base:endian",
  ]
}

absl_source_set("low_level_hash") {
  public = [ "internal/low_level_hash.h" ]
  sources = [ "internal/low_level_hash.cc" ]
  deps = [
    "//third_party/abseil-cpp/absl/base:config",
    "//third_party/abseil-cpp/absl/base:endian",
    "//third_party/abseil-cpp/absl/numeric:bits",
    "//third_party/abseil-cpp/absl/numeric:int128",
  ]
  visibility = [ ":*" ]
}

absl_test("low_level_hash_test") {
  sources = [ "internal/low_level_hash_test.cc" ]
  deps = [
    ":low_level_hash",
    "//third_party/abseil-cpp/absl/strings",
  ]
}