blob: 3a9ab0136c48cf7aed25111de343c54d6bf80eec [file] [log] [blame]
mistergc2e75482017-09-19 16:54:40 -04001#
2# Copyright 2017 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#
nik727338b70432019-03-08 10:27:53 -05008# https://www.apache.org/licenses/LICENSE-2.0
mistergc2e75482017-09-19 16:54:40 -04009#
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
17load(
Abseil Team284378a2018-12-05 12:37:41 -080018 "//absl:copts/configure_copts.bzl",
mistergc2e75482017-09-19 16:54:40 -040019 "ABSL_DEFAULT_COPTS",
Abseil Team5b65c4a2019-03-27 08:05:41 -070020 "ABSL_DEFAULT_LINKOPTS",
mistergc2e75482017-09-19 16:54:40 -040021 "ABSL_TEST_COPTS",
22)
mistergc2e75482017-09-19 16:54:40 -040023
24package(default_visibility = ["//visibility:public"])
25
Abseil Teamfbf0fda2020-08-20 08:54:55 -070026licenses(["notice"])
mistergc2e75482017-09-19 16:54:40 -040027
28cc_library(
29 name = "algorithm",
30 hdrs = ["algorithm.h"],
31 copts = ABSL_DEFAULT_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070032 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Teamd43b7992020-04-03 13:24:29 -070033 deps = [
34 "//absl/base:config",
35 ],
mistergc2e75482017-09-19 16:54:40 -040036)
37
38cc_test(
39 name = "algorithm_test",
40 size = "small",
41 srcs = ["algorithm_test.cc"],
42 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070043 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team2a62fbd2017-09-25 15:35:12 -070044 deps = [
45 ":algorithm",
Derek Mauro10ec11d2022-06-14 13:10:59 -070046 "//absl/base:config",
Abseil Team2a62fbd2017-09-25 15:35:12 -070047 "@com_google_googletest//:gtest_main",
48 ],
mistergc2e75482017-09-19 16:54:40 -040049)
50
Derek Mauro60499cf2022-09-06 12:02:16 -070051cc_binary(
Abseil Team26b789f2018-05-04 09:58:56 -070052 name = "algorithm_benchmark",
Derek Mauro60499cf2022-09-06 12:02:16 -070053 testonly = 1,
Abseil Team26b789f2018-05-04 09:58:56 -070054 srcs = ["equal_benchmark.cc"],
55 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070056 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team30de2042018-05-17 09:05:57 -070057 tags = ["benchmark"],
Abseil Team26b789f2018-05-04 09:58:56 -070058 deps = [
59 ":algorithm",
60 "//absl/base:core_headers",
Abseil Team7aacab82018-05-31 12:26:35 -070061 "@com_github_google_benchmark//:benchmark_main",
Abseil Team26b789f2018-05-04 09:58:56 -070062 ],
63)
64
mistergc2e75482017-09-19 16:54:40 -040065cc_library(
66 name = "container",
67 hdrs = [
68 "container.h",
69 ],
70 copts = ABSL_DEFAULT_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070071 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040072 deps = [
73 ":algorithm",
74 "//absl/base:core_headers",
75 "//absl/meta:type_traits",
76 ],
77)
78
79cc_test(
80 name = "container_test",
81 srcs = ["container_test.cc"],
82 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070083 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040084 deps = [
85 ":container",
86 "//absl/base",
87 "//absl/base:core_headers",
88 "//absl/memory",
89 "//absl/types:span",
Abseil Team2a62fbd2017-09-25 15:35:12 -070090 "@com_google_googletest//:gtest_main",
91 ],
mistergc2e75482017-09-19 16:54:40 -040092)