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