CMakeLists.txt (3247B)
1 # 2 # Copyright 2018 The Abseil Authors. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # https://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # 16 17 absl_cc_library( 18 NAME 19 hash 20 HDRS 21 "hash.h" 22 SRCS 23 "internal/hash.cc" 24 "internal/hash.h" 25 COPTS 26 ${ABSL_DEFAULT_COPTS} 27 DEPS 28 absl::bits 29 absl::city 30 absl::config 31 absl::core_headers 32 absl::endian 33 absl::fixed_array 34 absl::function_ref 35 absl::meta 36 absl::int128 37 absl::strings 38 absl::optional 39 absl::variant 40 absl::utility 41 absl::low_level_hash 42 PUBLIC 43 ) 44 45 absl_cc_library( 46 NAME 47 hash_testing 48 HDRS 49 "hash_testing.h" 50 COPTS 51 ${ABSL_TEST_COPTS} 52 DEPS 53 absl::spy_hash_state 54 absl::meta 55 absl::strings 56 absl::variant 57 GTest::gmock 58 TESTONLY 59 PUBLIC 60 ) 61 62 absl_cc_test( 63 NAME 64 hash_test 65 SRCS 66 "hash_test.cc" 67 "internal/hash_test.h" 68 COPTS 69 ${ABSL_TEST_COPTS} 70 DEPS 71 absl::bits 72 absl::cord_test_helpers 73 absl::flat_hash_set 74 absl::hash 75 absl::hash_testing 76 absl::memory 77 absl::meta 78 absl::optional 79 absl::spy_hash_state 80 absl::string_view 81 absl::variant 82 GTest::gmock_main 83 ) 84 85 absl_cc_test( 86 NAME 87 hash_instantiated_test 88 SRCS 89 "hash_instantiated_test.cc" 90 "internal/hash_test.h" 91 COPTS 92 ${ABSL_TEST_COPTS} 93 DEPS 94 absl::hash 95 absl::hash_testing 96 absl::config 97 absl::btree 98 absl::flat_hash_map 99 absl::flat_hash_set 100 absl::node_hash_map 101 absl::node_hash_set 102 GTest::gmock_main 103 ) 104 105 # Internal-only target, do not depend on directly. 106 # 107 # Note: Even though external code should not depend on this target 108 # directly, it must be marked PUBLIC since it is a dependency of 109 # hash_testing. 110 absl_cc_library( 111 NAME 112 spy_hash_state 113 HDRS 114 "internal/spy_hash_state.h" 115 COPTS 116 ${ABSL_DEFAULT_COPTS} 117 DEPS 118 absl::hash 119 absl::strings 120 absl::str_format 121 TESTONLY 122 PUBLIC 123 ) 124 125 # Internal-only target, do not depend on directly. 126 absl_cc_library( 127 NAME 128 city 129 HDRS 130 "internal/city.h" 131 SRCS 132 "internal/city.cc" 133 COPTS 134 ${ABSL_DEFAULT_COPTS} 135 DEPS 136 absl::config 137 absl::core_headers 138 absl::endian 139 ) 140 141 absl_cc_test( 142 NAME 143 city_test 144 SRCS 145 "internal/city_test.cc" 146 COPTS 147 ${ABSL_TEST_COPTS} 148 DEPS 149 absl::city 150 GTest::gmock_main 151 ) 152 153 # Internal-only target, do not depend on directly. 154 absl_cc_library( 155 NAME 156 low_level_hash 157 HDRS 158 "internal/low_level_hash.h" 159 SRCS 160 "internal/low_level_hash.cc" 161 COPTS 162 ${ABSL_DEFAULT_COPTS} 163 DEPS 164 absl::config 165 absl::core_headers 166 absl::endian 167 absl::int128 168 absl::prefetch 169 ) 170 171 absl_cc_test( 172 NAME 173 low_level_hash_test 174 SRCS 175 "internal/low_level_hash_test.cc" 176 COPTS 177 ${ABSL_TEST_COPTS} 178 DEPS 179 absl::low_level_hash 180 absl::strings 181 GTest::gmock_main 182 )