blob: 229cd713a2065538476dba751245f38d5f02d453 [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,
Abseil Teamd43b7992020-04-03 13:24:29 -070034 deps = [
35 "//absl/base:config",
36 ],
mistergc2e75482017-09-19 16:54:40 -040037)
38
39cc_test(
40 name = "algorithm_test",
41 size = "small",
42 srcs = ["algorithm_test.cc"],
43 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070044 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team2a62fbd2017-09-25 15:35:12 -070045 deps = [
46 ":algorithm",
47 "@com_google_googletest//:gtest_main",
48 ],
mistergc2e75482017-09-19 16:54:40 -040049)
50
Abseil Team30de2042018-05-17 09:05:57 -070051cc_test(
Abseil Team26b789f2018-05-04 09:58:56 -070052 name = "algorithm_benchmark",
Abseil Team26b789f2018-05-04 09:58:56 -070053 srcs = ["equal_benchmark.cc"],
54 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070055 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team30de2042018-05-17 09:05:57 -070056 tags = ["benchmark"],
Abseil Team26b789f2018-05-04 09:58:56 -070057 deps = [
58 ":algorithm",
59 "//absl/base:core_headers",
Abseil Team7aacab82018-05-31 12:26:35 -070060 "@com_github_google_benchmark//:benchmark_main",
Abseil Team26b789f2018-05-04 09:58:56 -070061 ],
62)
63
mistergc2e75482017-09-19 16:54:40 -040064cc_library(
65 name = "container",
66 hdrs = [
67 "container.h",
68 ],
69 copts = ABSL_DEFAULT_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070070 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040071 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,
Abseil Team5b65c4a2019-03-27 08:05:41 -070082 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040083 deps = [
84 ":container",
85 "//absl/base",
86 "//absl/base:core_headers",
87 "//absl/memory",
88 "//absl/types:span",
Abseil Team2a62fbd2017-09-25 15:35:12 -070089 "@com_google_googletest//:gtest_main",
90 ],
mistergc2e75482017-09-19 16:54:40 -040091)