xref: /aosp_15_r20/external/abseil-cpp/absl/functional/BUILD.bazel (revision 9356374a3709195abf420251b3e825997ff56c0f)
1*9356374aSAndroid Build Coastguard Worker#
2*9356374aSAndroid Build Coastguard Worker# Copyright 2019 The Abseil Authors.
3*9356374aSAndroid Build Coastguard Worker#
4*9356374aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
5*9356374aSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
6*9356374aSAndroid Build Coastguard Worker# You may obtain a copy of the License at
7*9356374aSAndroid Build Coastguard Worker#
8*9356374aSAndroid Build Coastguard Worker#      https://www.apache.org/licenses/LICENSE-2.0
9*9356374aSAndroid Build Coastguard Worker#
10*9356374aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
11*9356374aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
12*9356374aSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*9356374aSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
14*9356374aSAndroid Build Coastguard Worker# limitations under the License.
15*9356374aSAndroid Build Coastguard Worker#
16*9356374aSAndroid Build Coastguard Worker
17*9356374aSAndroid Build Coastguard Workerload(
18*9356374aSAndroid Build Coastguard Worker    "//absl:copts/configure_copts.bzl",
19*9356374aSAndroid Build Coastguard Worker    "ABSL_DEFAULT_COPTS",
20*9356374aSAndroid Build Coastguard Worker    "ABSL_DEFAULT_LINKOPTS",
21*9356374aSAndroid Build Coastguard Worker    "ABSL_TEST_COPTS",
22*9356374aSAndroid Build Coastguard Worker)
23*9356374aSAndroid Build Coastguard Worker
24*9356374aSAndroid Build Coastguard Workerpackage(
25*9356374aSAndroid Build Coastguard Worker    default_visibility = ["//visibility:public"],
26*9356374aSAndroid Build Coastguard Worker    features = [
27*9356374aSAndroid Build Coastguard Worker        "header_modules",
28*9356374aSAndroid Build Coastguard Worker        "layering_check",
29*9356374aSAndroid Build Coastguard Worker        "parse_headers",
30*9356374aSAndroid Build Coastguard Worker    ],
31*9356374aSAndroid Build Coastguard Worker)
32*9356374aSAndroid Build Coastguard Worker
33*9356374aSAndroid Build Coastguard Workerlicenses(["notice"])
34*9356374aSAndroid Build Coastguard Worker
35*9356374aSAndroid Build Coastguard Workercc_library(
36*9356374aSAndroid Build Coastguard Worker    name = "any_invocable",
37*9356374aSAndroid Build Coastguard Worker    srcs = ["internal/any_invocable.h"],
38*9356374aSAndroid Build Coastguard Worker    hdrs = ["any_invocable.h"],
39*9356374aSAndroid Build Coastguard Worker    copts = ABSL_DEFAULT_COPTS,
40*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
41*9356374aSAndroid Build Coastguard Worker    deps = [
42*9356374aSAndroid Build Coastguard Worker        "//absl/base:base_internal",
43*9356374aSAndroid Build Coastguard Worker        "//absl/base:config",
44*9356374aSAndroid Build Coastguard Worker        "//absl/base:core_headers",
45*9356374aSAndroid Build Coastguard Worker        "//absl/meta:type_traits",
46*9356374aSAndroid Build Coastguard Worker        "//absl/utility",
47*9356374aSAndroid Build Coastguard Worker    ],
48*9356374aSAndroid Build Coastguard Worker)
49*9356374aSAndroid Build Coastguard Worker
50*9356374aSAndroid Build Coastguard Workercc_test(
51*9356374aSAndroid Build Coastguard Worker    name = "any_invocable_test",
52*9356374aSAndroid Build Coastguard Worker    srcs = [
53*9356374aSAndroid Build Coastguard Worker        "any_invocable_test.cc",
54*9356374aSAndroid Build Coastguard Worker        "internal/any_invocable.h",
55*9356374aSAndroid Build Coastguard Worker    ],
56*9356374aSAndroid Build Coastguard Worker    copts = ABSL_TEST_COPTS,
57*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
58*9356374aSAndroid Build Coastguard Worker    deps = [
59*9356374aSAndroid Build Coastguard Worker        ":any_invocable",
60*9356374aSAndroid Build Coastguard Worker        "//absl/base:base_internal",
61*9356374aSAndroid Build Coastguard Worker        "//absl/base:config",
62*9356374aSAndroid Build Coastguard Worker        "//absl/base:core_headers",
63*9356374aSAndroid Build Coastguard Worker        "//absl/meta:type_traits",
64*9356374aSAndroid Build Coastguard Worker        "//absl/utility",
65*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest",
66*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
67*9356374aSAndroid Build Coastguard Worker    ],
68*9356374aSAndroid Build Coastguard Worker)
69*9356374aSAndroid Build Coastguard Worker
70*9356374aSAndroid Build Coastguard Workercc_library(
71*9356374aSAndroid Build Coastguard Worker    name = "bind_front",
72*9356374aSAndroid Build Coastguard Worker    srcs = ["internal/front_binder.h"],
73*9356374aSAndroid Build Coastguard Worker    hdrs = ["bind_front.h"],
74*9356374aSAndroid Build Coastguard Worker    copts = ABSL_DEFAULT_COPTS,
75*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
76*9356374aSAndroid Build Coastguard Worker    deps = [
77*9356374aSAndroid Build Coastguard Worker        "//absl/base:base_internal",
78*9356374aSAndroid Build Coastguard Worker        "//absl/container:compressed_tuple",
79*9356374aSAndroid Build Coastguard Worker        "//absl/meta:type_traits",
80*9356374aSAndroid Build Coastguard Worker        "//absl/utility",
81*9356374aSAndroid Build Coastguard Worker    ],
82*9356374aSAndroid Build Coastguard Worker)
83*9356374aSAndroid Build Coastguard Worker
84*9356374aSAndroid Build Coastguard Workercc_test(
85*9356374aSAndroid Build Coastguard Worker    name = "bind_front_test",
86*9356374aSAndroid Build Coastguard Worker    srcs = ["bind_front_test.cc"],
87*9356374aSAndroid Build Coastguard Worker    copts = ABSL_TEST_COPTS,
88*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
89*9356374aSAndroid Build Coastguard Worker    deps = [
90*9356374aSAndroid Build Coastguard Worker        ":bind_front",
91*9356374aSAndroid Build Coastguard Worker        "//absl/memory",
92*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest",
93*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
94*9356374aSAndroid Build Coastguard Worker    ],
95*9356374aSAndroid Build Coastguard Worker)
96*9356374aSAndroid Build Coastguard Worker
97*9356374aSAndroid Build Coastguard Workercc_library(
98*9356374aSAndroid Build Coastguard Worker    name = "function_ref",
99*9356374aSAndroid Build Coastguard Worker    srcs = ["internal/function_ref.h"],
100*9356374aSAndroid Build Coastguard Worker    hdrs = ["function_ref.h"],
101*9356374aSAndroid Build Coastguard Worker    copts = ABSL_DEFAULT_COPTS,
102*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
103*9356374aSAndroid Build Coastguard Worker    deps = [
104*9356374aSAndroid Build Coastguard Worker        ":any_invocable",
105*9356374aSAndroid Build Coastguard Worker        "//absl/base:base_internal",
106*9356374aSAndroid Build Coastguard Worker        "//absl/base:core_headers",
107*9356374aSAndroid Build Coastguard Worker        "//absl/meta:type_traits",
108*9356374aSAndroid Build Coastguard Worker    ],
109*9356374aSAndroid Build Coastguard Worker)
110*9356374aSAndroid Build Coastguard Worker
111*9356374aSAndroid Build Coastguard Workercc_test(
112*9356374aSAndroid Build Coastguard Worker    name = "function_ref_test",
113*9356374aSAndroid Build Coastguard Worker    size = "small",
114*9356374aSAndroid Build Coastguard Worker    srcs = ["function_ref_test.cc"],
115*9356374aSAndroid Build Coastguard Worker    copts = ABSL_TEST_COPTS,
116*9356374aSAndroid Build Coastguard Worker    deps = [
117*9356374aSAndroid Build Coastguard Worker        ":any_invocable",
118*9356374aSAndroid Build Coastguard Worker        ":function_ref",
119*9356374aSAndroid Build Coastguard Worker        "//absl/container:test_instance_tracker",
120*9356374aSAndroid Build Coastguard Worker        "//absl/memory",
121*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest",
122*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
123*9356374aSAndroid Build Coastguard Worker    ],
124*9356374aSAndroid Build Coastguard Worker)
125*9356374aSAndroid Build Coastguard Worker
126*9356374aSAndroid Build Coastguard Workercc_library(
127*9356374aSAndroid Build Coastguard Worker    name = "overload",
128*9356374aSAndroid Build Coastguard Worker    hdrs = ["overload.h"],
129*9356374aSAndroid Build Coastguard Worker    copts = ABSL_DEFAULT_COPTS,
130*9356374aSAndroid Build Coastguard Worker    linkopts = ABSL_DEFAULT_LINKOPTS,
131*9356374aSAndroid Build Coastguard Worker    deps = [
132*9356374aSAndroid Build Coastguard Worker        "//absl/base:config",
133*9356374aSAndroid Build Coastguard Worker        "//absl/meta:type_traits",
134*9356374aSAndroid Build Coastguard Worker    ],
135*9356374aSAndroid Build Coastguard Worker)
136*9356374aSAndroid Build Coastguard Worker
137*9356374aSAndroid Build Coastguard Workercc_test(
138*9356374aSAndroid Build Coastguard Worker    name = "overload_test",
139*9356374aSAndroid Build Coastguard Worker    size = "small",
140*9356374aSAndroid Build Coastguard Worker    srcs = ["overload_test.cc"],
141*9356374aSAndroid Build Coastguard Worker    copts = ABSL_TEST_COPTS,
142*9356374aSAndroid Build Coastguard Worker    deps = [
143*9356374aSAndroid Build Coastguard Worker        ":overload",
144*9356374aSAndroid Build Coastguard Worker        "//absl/base:config",
145*9356374aSAndroid Build Coastguard Worker        "//absl/strings",
146*9356374aSAndroid Build Coastguard Worker        "//absl/strings:string_view",
147*9356374aSAndroid Build Coastguard Worker        "//absl/types:variant",
148*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest",
149*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest_main",
150*9356374aSAndroid Build Coastguard Worker    ],
151*9356374aSAndroid Build Coastguard Worker)
152*9356374aSAndroid Build Coastguard Worker
153*9356374aSAndroid Build Coastguard Workercc_test(
154*9356374aSAndroid Build Coastguard Worker    name = "function_type_benchmark",
155*9356374aSAndroid Build Coastguard Worker    srcs = [
156*9356374aSAndroid Build Coastguard Worker        "function_type_benchmark.cc",
157*9356374aSAndroid Build Coastguard Worker    ],
158*9356374aSAndroid Build Coastguard Worker    copts = ABSL_TEST_COPTS,
159*9356374aSAndroid Build Coastguard Worker    tags = ["benchmark"],
160*9356374aSAndroid Build Coastguard Worker    visibility = ["//visibility:private"],
161*9356374aSAndroid Build Coastguard Worker    deps = [
162*9356374aSAndroid Build Coastguard Worker        ":any_invocable",
163*9356374aSAndroid Build Coastguard Worker        ":function_ref",
164*9356374aSAndroid Build Coastguard Worker        "//absl/base:core_headers",
165*9356374aSAndroid Build Coastguard Worker        "@com_github_google_benchmark//:benchmark_main",
166*9356374aSAndroid Build Coastguard Worker        "@com_google_googletest//:gtest",
167*9356374aSAndroid Build Coastguard Worker    ],
168*9356374aSAndroid Build Coastguard Worker)
169