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:string_view", 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 = [ 46 "hash_test.cc", 47 "internal/hash_test.h", 48 ] 49 deps = [ 50 ":hash", 51 ":hash_testing", 52 ":spy_hash_state", 53 "//third_party/abseil-cpp/absl/base:config", 54 "//third_party/abseil-cpp/absl/base:core_headers", 55 "//third_party/abseil-cpp/absl/container:btree", 56 "//third_party/abseil-cpp/absl/container:flat_hash_map", 57 "//third_party/abseil-cpp/absl/container:flat_hash_set", 58 "//third_party/abseil-cpp/absl/container:node_hash_map", 59 "//third_party/abseil-cpp/absl/container:node_hash_set", 60 "//third_party/abseil-cpp/absl/memory", 61 "//third_party/abseil-cpp/absl/meta:type_traits", 62 "//third_party/abseil-cpp/absl/numeric:int128", 63 "//third_party/abseil-cpp/absl/strings:cord_test_helpers", 64 "//third_party/abseil-cpp/absl/strings:string_view", 65 "//third_party/abseil-cpp/absl/types:optional", 66 "//third_party/abseil-cpp/absl/types:variant", 67 ] 68} 69 70absl_test("hash_instantiated_test") { 71 sources = [ 72 "hash_instantiated_test.cc", 73 "internal/hash_test.h", 74 ] 75 deps = [ 76 ":hash", 77 ":hash_testing", 78 "//third_party/abseil-cpp/absl/base:config", 79 "//third_party/abseil-cpp/absl/container:btree", 80 "//third_party/abseil-cpp/absl/container:flat_hash_map", 81 "//third_party/abseil-cpp/absl/container:flat_hash_set", 82 "//third_party/abseil-cpp/absl/container:node_hash_map", 83 "//third_party/abseil-cpp/absl/container:node_hash_set", 84 ] 85} 86 87absl_source_set("spy_hash_state") { 88 testonly = true 89 public = [ "internal/spy_hash_state.h" ] 90 deps = [ 91 ":hash", 92 "//third_party/abseil-cpp/absl/strings", 93 "//third_party/abseil-cpp/absl/strings:str_format", 94 ] 95 visibility = [ "//third_party/abseil-cpp/absl/*" ] 96} 97 98absl_source_set("city") { 99 public = [ "internal/city.h" ] 100 sources = [ "internal/city.cc" ] 101 deps = [ 102 "//third_party/abseil-cpp/absl/base:config", 103 "//third_party/abseil-cpp/absl/base:core_headers", 104 "//third_party/abseil-cpp/absl/base:endian", 105 ] 106} 107 108absl_source_set("low_level_hash") { 109 public = [ "internal/low_level_hash.h" ] 110 sources = [ "internal/low_level_hash.cc" ] 111 deps = [ 112 "//third_party/abseil-cpp/absl/base:config", 113 "//third_party/abseil-cpp/absl/base:endian", 114 "//third_party/abseil-cpp/absl/base:prefetch", 115 "//third_party/abseil-cpp/absl/numeric:int128", 116 ] 117 visibility = [ ":*" ] 118} 119 120absl_test("low_level_hash_test") { 121 sources = [ "internal/low_level_hash_test.cc" ] 122 deps = [ 123 ":low_level_hash", 124 "//third_party/abseil-cpp/absl/strings", 125 ] 126} 127