blob: 2ee8c09e62685e2d6869a2ceaf89840e228637c0 [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
Yannic36910d32019-08-16 14:38:13 +000017load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
mistergc2e75482017-09-19 16:54:40 -040018load(
Abseil Team284378a2018-12-05 12:37:41 -080019 "//absl:copts/configure_copts.bzl",
mistergc2e75482017-09-19 16:54:40 -040020 "ABSL_DEFAULT_COPTS",
Abseil Team5b65c4a2019-03-27 08:05:41 -070021 "ABSL_DEFAULT_LINKOPTS",
mistergc2e75482017-09-19 16:54:40 -040022 "ABSL_TEST_COPTS",
23)
mistergc2e75482017-09-19 16:54:40 -040024
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,
Abseil Team5b65c4a2019-03-27 08:05:41 -070033 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040034)
35
36cc_test(
37 name = "algorithm_test",
38 size = "small",
39 srcs = ["algorithm_test.cc"],
40 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070041 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team2a62fbd2017-09-25 15:35:12 -070042 deps = [
43 ":algorithm",
44 "@com_google_googletest//:gtest_main",
45 ],
mistergc2e75482017-09-19 16:54:40 -040046)
47
Abseil Team30de2042018-05-17 09:05:57 -070048cc_test(
Abseil Team26b789f2018-05-04 09:58:56 -070049 name = "algorithm_benchmark",
Abseil Team26b789f2018-05-04 09:58:56 -070050 srcs = ["equal_benchmark.cc"],
51 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070052 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team30de2042018-05-17 09:05:57 -070053 tags = ["benchmark"],
Abseil Team26b789f2018-05-04 09:58:56 -070054 deps = [
55 ":algorithm",
56 "//absl/base:core_headers",
Abseil Team7aacab82018-05-31 12:26:35 -070057 "@com_github_google_benchmark//:benchmark_main",
Abseil Team26b789f2018-05-04 09:58:56 -070058 ],
59)
60
mistergc2e75482017-09-19 16:54:40 -040061cc_library(
62 name = "container",
63 hdrs = [
64 "container.h",
65 ],
66 copts = ABSL_DEFAULT_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070067 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040068 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,
Abseil Team5b65c4a2019-03-27 08:05:41 -070079 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040080 deps = [
81 ":container",
82 "//absl/base",
83 "//absl/base:core_headers",
84 "//absl/memory",
85 "//absl/types:span",
Abseil Team2a62fbd2017-09-25 15:35:12 -070086 "@com_google_googletest//:gtest_main",
87 ],
mistergc2e75482017-09-19 16:54:40 -040088)