blob: a3002b7dcd5f731626c888eaa1fd2b4a13c0f5ca [file] [log] [blame]
Austin Schuh36244a12019-09-21 17:52:38 -07001#
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#
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
17load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
18load(
19 "//absl:copts/configure_copts.bzl",
20 "ABSL_DEFAULT_COPTS",
21 "ABSL_DEFAULT_LINKOPTS",
22 "ABSL_TEST_COPTS",
23)
24
25package(default_visibility = ["//visibility:public"])
26
Austin Schuhb4691e92020-12-31 12:37:18 -080027licenses(["notice"])
Austin Schuh36244a12019-09-21 17:52:38 -070028
29cc_library(
30 name = "algorithm",
31 hdrs = ["algorithm.h"],
32 copts = ABSL_DEFAULT_COPTS,
33 linkopts = ABSL_DEFAULT_LINKOPTS,
Austin Schuhb4691e92020-12-31 12:37:18 -080034 deps = [
35 "//absl/base:config",
36 ],
Austin Schuh36244a12019-09-21 17:52:38 -070037)
38
39cc_test(
40 name = "algorithm_test",
41 size = "small",
42 srcs = ["algorithm_test.cc"],
43 copts = ABSL_TEST_COPTS,
44 linkopts = ABSL_DEFAULT_LINKOPTS,
45 deps = [
46 ":algorithm",
47 "@com_google_googletest//:gtest_main",
48 ],
49)
50
51cc_test(
52 name = "algorithm_benchmark",
53 srcs = ["equal_benchmark.cc"],
54 copts = ABSL_TEST_COPTS,
55 linkopts = ABSL_DEFAULT_LINKOPTS,
56 tags = ["benchmark"],
57 deps = [
58 ":algorithm",
59 "//absl/base:core_headers",
60 "@com_github_google_benchmark//:benchmark_main",
61 ],
62)
63
64cc_library(
65 name = "container",
66 hdrs = [
67 "container.h",
68 ],
69 copts = ABSL_DEFAULT_COPTS,
70 linkopts = ABSL_DEFAULT_LINKOPTS,
71 deps = [
72 ":algorithm",
73 "//absl/base:core_headers",
74 "//absl/meta:type_traits",
75 ],
76)
77
78cc_test(
79 name = "container_test",
80 srcs = ["container_test.cc"],
81 copts = ABSL_TEST_COPTS,
82 linkopts = ABSL_DEFAULT_LINKOPTS,
83 deps = [
84 ":container",
85 "//absl/base",
86 "//absl/base:core_headers",
87 "//absl/memory",
88 "//absl/types:span",
89 "@com_google_googletest//:gtest_main",
90 ],
91)