• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #
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 
17 load(
18     "//absl:copts/configure_copts.bzl",
19     "ABSL_DEFAULT_COPTS",
20     "ABSL_DEFAULT_LINKOPTS",
21     "ABSL_TEST_COPTS",
22 )
23 
24 package(default_visibility = ["//visibility:public"])
25 
26 licenses(["notice"])
27 
28 cc_library(
29     name = "algorithm",
30     hdrs = ["algorithm.h"],
31     copts = ABSL_DEFAULT_COPTS,
32     linkopts = ABSL_DEFAULT_LINKOPTS,
33     deps = [
34         "//absl/base:config",
35     ],
36 )
37 
38 cc_test(
39     name = "algorithm_test",
40     size = "small",
41     srcs = ["algorithm_test.cc"],
42     copts = ABSL_TEST_COPTS,
43     linkopts = ABSL_DEFAULT_LINKOPTS,
44     deps = [
45         ":algorithm",
46         "//absl/base:config",
47         "@com_google_googletest//:gtest_main",
48     ],
49 )
50 
51 cc_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 
64 cc_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 
78 cc_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 )
92