xref: /aosp_15_r20/external/abseil-cpp/absl/functional/CMakeLists.txt (revision 9356374a3709195abf420251b3e825997ff56c0f)
1#
2# Copyright 2019 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
17absl_cc_library(
18  NAME
19    any_invocable
20  SRCS
21    "internal/any_invocable.h"
22  HDRS
23    "any_invocable.h"
24  COPTS
25    ${ABSL_DEFAULT_COPTS}
26  DEPS
27    absl::base_internal
28    absl::config
29    absl::core_headers
30    absl::type_traits
31    absl::utility
32  PUBLIC
33)
34
35absl_cc_test(
36  NAME
37    any_invocable_test
38  SRCS
39    "any_invocable_test.cc"
40    "internal/any_invocable.h"
41  COPTS
42    ${ABSL_TEST_COPTS}
43  DEPS
44    absl::any_invocable
45    absl::base_internal
46    absl::config
47    absl::core_headers
48    absl::type_traits
49    absl::utility
50    GTest::gmock_main
51)
52
53absl_cc_library(
54  NAME
55    bind_front
56  SRCS
57    "internal/front_binder.h"
58  HDRS
59    "bind_front.h"
60  COPTS
61    ${ABSL_DEFAULT_COPTS}
62  DEPS
63    absl::base_internal
64    absl::compressed_tuple
65  PUBLIC
66)
67
68absl_cc_test(
69  NAME
70    bind_front_test
71  SRCS
72    "bind_front_test.cc"
73  COPTS
74    ${ABSL_DEFAULT_COPTS}
75  DEPS
76    absl::bind_front
77    absl::memory
78    GTest::gmock_main
79)
80
81absl_cc_library(
82  NAME
83    function_ref
84  SRCS
85    "internal/function_ref.h"
86  HDRS
87    "function_ref.h"
88  COPTS
89    ${ABSL_DEFAULT_COPTS}
90  DEPS
91    absl::base_internal
92    absl::core_headers
93    absl::any_invocable
94    absl::meta
95  PUBLIC
96)
97
98absl_cc_test(
99  NAME
100    function_ref_test
101  SRCS
102    "function_ref_test.cc"
103  COPTS
104    ${ABSL_TEST_COPTS}
105  DEPS
106    absl::function_ref
107    absl::memory
108    absl::test_instance_tracker
109    GTest::gmock_main
110)
111
112absl_cc_library(
113  NAME
114    overload
115  HDRS
116    "overload.h"
117  COPTS
118    ${ABSL_DEFAULT_COPTS}
119  DEPS
120    absl::meta
121  PUBLIC
122)
123
124absl_cc_test(
125  NAME
126    overload_test
127  SRCS
128    "overload_test.cc"
129  COPTS
130    ${ABSL_TEST_COPTS}
131  DEPS
132    absl::config
133    absl::overload
134    absl::string_view
135    absl::strings
136    absl::variant
137    GTest::gmock_main
138)
139