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:int128", 24 "//third_party/abseil-cpp/absl/strings", 25 "//third_party/abseil-cpp/absl/types:optional", 26 "//third_party/abseil-cpp/absl/types:variant", 27 "//third_party/abseil-cpp/absl/utility", 28 ] 29} 30 31absl_source_set("hash_testing") { 32 testonly = true 33 public = [ "hash_testing.h" ] 34 deps = [ 35 ":spy_hash_state", 36 "//third_party/abseil-cpp/absl/meta:type_traits", 37 "//third_party/abseil-cpp/absl/strings", 38 "//third_party/abseil-cpp/absl/types:variant", 39 "//third_party/googletest:gtest", 40 ] 41} 42 43absl_test("hash_test") { 44 sources = [ "hash_test.cc" ] 45 deps = [ 46 ":hash", 47 ":hash_testing", 48 ":spy_hash_state", 49 "//third_party/abseil-cpp/absl/base:core_headers", 50 "//third_party/abseil-cpp/absl/container:btree", 51 "//third_party/abseil-cpp/absl/container:flat_hash_map", 52 "//third_party/abseil-cpp/absl/container:flat_hash_set", 53 "//third_party/abseil-cpp/absl/container:node_hash_map", 54 "//third_party/abseil-cpp/absl/container:node_hash_set", 55 "//third_party/abseil-cpp/absl/meta:type_traits", 56 "//third_party/abseil-cpp/absl/numeric:int128", 57 "//third_party/abseil-cpp/absl/strings:cord_test_helpers", 58 ] 59} 60 61absl_source_set("spy_hash_state") { 62 testonly = true 63 public = [ "internal/spy_hash_state.h" ] 64 deps = [ 65 ":hash", 66 "//third_party/abseil-cpp/absl/strings", 67 "//third_party/abseil-cpp/absl/strings:str_format", 68 ] 69 visibility = [ "//third_party/abseil-cpp/absl/*" ] 70} 71 72absl_source_set("city") { 73 public = [ "internal/city.h" ] 74 sources = [ "internal/city.cc" ] 75 deps = [ 76 "//third_party/abseil-cpp/absl/base:config", 77 "//third_party/abseil-cpp/absl/base:core_headers", 78 "//third_party/abseil-cpp/absl/base:endian", 79 ] 80} 81 82absl_source_set("low_level_hash") { 83 public = [ "internal/low_level_hash.h" ] 84 sources = [ "internal/low_level_hash.cc" ] 85 deps = [ 86 "//third_party/abseil-cpp/absl/base:config", 87 "//third_party/abseil-cpp/absl/base:endian", 88 "//third_party/abseil-cpp/absl/numeric:bits", 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