blob: 2ee8c09e62685e2d6869a2ceaf89840e228637c0 [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
27licenses(["notice"]) # Apache 2.0
28
29cc_library(
30 name = "algorithm",
31 hdrs = ["algorithm.h"],
32 copts = ABSL_DEFAULT_COPTS,
33 linkopts = ABSL_DEFAULT_LINKOPTS,
34)
35
36cc_test(
37 name = "algorithm_test",
38 size = "small",
39 srcs = ["algorithm_test.cc"],
40 copts = ABSL_TEST_COPTS,
41 linkopts = ABSL_DEFAULT_LINKOPTS,
42 deps = [
43 ":algorithm",
44 "@com_google_googletest//:gtest_main",
45 ],
46)
47
48cc_test(
49 name = "algorithm_benchmark",
50 srcs = ["equal_benchmark.cc"],
51 copts = ABSL_TEST_COPTS,
52 linkopts = ABSL_DEFAULT_LINKOPTS,
53 tags = ["benchmark"],
54 deps = [
55 ":algorithm",
56 "//absl/base:core_headers",
57 "@com_github_google_benchmark//:benchmark_main",
58 ],
59)
60
61cc_library(
62 name = "container",
63 hdrs = [
64 "container.h",
65 ],
66 copts = ABSL_DEFAULT_COPTS,
67 linkopts = ABSL_DEFAULT_LINKOPTS,
68 deps = [
69 ":algorithm",
70 "//absl/base:core_headers",
71 "//absl/meta:type_traits",
72 ],
73)
74
75cc_test(
76 name = "container_test",
77 srcs = ["container_test.cc"],
78 copts = ABSL_TEST_COPTS,
79 linkopts = ABSL_DEFAULT_LINKOPTS,
80 deps = [
81 ":container",
82 "//absl/base",
83 "//absl/base:core_headers",
84 "//absl/memory",
85 "//absl/types:span",
86 "@com_google_googletest//:gtest_main",
87 ],
88)