• 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# Internal-only target, do not depend on directly.
18absl_cc_library(
19  NAME
20    graphcycles_internal
21  HDRS
22    "internal/graphcycles.h"
23  SRCS
24    "internal/graphcycles.cc"
25  COPTS
26    ${ABSL_DEFAULT_COPTS}
27  DEPS
28    absl::base
29    absl::base_internal
30    absl::config
31    absl::core_headers
32    absl::malloc_internal
33    absl::raw_logging_internal
34)
35
36# Internal-only target, do not depend on directly.
37absl_cc_library(
38  NAME
39    kernel_timeout_internal
40  HDRS
41    "internal/kernel_timeout.h"
42  COPTS
43    ${ABSL_DEFAULT_COPTS}
44  DEPS
45    absl::core_headers
46    absl::raw_logging_internal
47    absl::time
48)
49
50absl_cc_library(
51  NAME
52    synchronization
53  HDRS
54    "barrier.h"
55    "blocking_counter.h"
56    "internal/create_thread_identity.h"
57    "internal/futex.h"
58    "internal/per_thread_sem.h"
59    "internal/waiter.h"
60    "mutex.h"
61    "notification.h"
62  SRCS
63    "barrier.cc"
64    "blocking_counter.cc"
65    "internal/create_thread_identity.cc"
66    "internal/per_thread_sem.cc"
67    "internal/waiter.cc"
68    "notification.cc"
69    "mutex.cc"
70  COPTS
71    ${ABSL_DEFAULT_COPTS}
72  DEPS
73    absl::graphcycles_internal
74    absl::kernel_timeout_internal
75    absl::atomic_hook
76    absl::base
77    absl::base_internal
78    absl::config
79    absl::core_headers
80    absl::dynamic_annotations
81    absl::malloc_internal
82    absl::raw_logging_internal
83    absl::stacktrace
84    absl::symbolize
85    absl::time
86    Threads::Threads
87  PUBLIC
88)
89
90absl_cc_test(
91  NAME
92    barrier_test
93  SRCS
94    "barrier_test.cc"
95  COPTS
96    ${ABSL_TEST_COPTS}
97  DEPS
98    absl::synchronization
99    absl::time
100    GTest::gmock_main
101)
102
103absl_cc_test(
104  NAME
105    blocking_counter_test
106  SRCS
107    "blocking_counter_test.cc"
108  COPTS
109    ${ABSL_TEST_COPTS}
110  DEPS
111    absl::synchronization
112    absl::time
113    GTest::gmock_main
114)
115
116absl_cc_test(
117  NAME
118    graphcycles_test
119  SRCS
120    "internal/graphcycles_test.cc"
121  COPTS
122    ${ABSL_TEST_COPTS}
123  DEPS
124    absl::graphcycles_internal
125    absl::core_headers
126    absl::raw_logging_internal
127    GTest::gmock_main
128)
129
130# Internal-only target, do not depend on directly.
131absl_cc_library(
132  NAME
133    thread_pool
134  HDRS
135    "internal/thread_pool.h"
136  COPTS
137    ${ABSL_DEFAULT_COPTS}
138  DEPS
139    absl::any_invocable
140    absl::core_headers
141    absl::synchronization
142  TESTONLY
143)
144
145absl_cc_test(
146  NAME
147    mutex_test
148  SRCS
149    "mutex_test.cc"
150  COPTS
151    ${ABSL_TEST_COPTS}
152  DEPS
153    absl::synchronization
154    absl::thread_pool
155    absl::base
156    absl::config
157    absl::core_headers
158    absl::memory
159    absl::raw_logging_internal
160    absl::time
161    GTest::gmock_main
162)
163
164absl_cc_test(
165  NAME
166    mutex_method_pointer_test
167  SRCS
168    "mutex_method_pointer_test.cc"
169  COPTS
170    ${ABSL_TEST_COPTS}
171  DEPS
172    absl::base
173    absl::config
174    absl::synchronization
175    GTest::gmock_main
176)
177
178absl_cc_test(
179  NAME
180    notification_test
181  SRCS
182    "notification_test.cc"
183  COPTS
184    ${ABSL_TEST_COPTS}
185  DEPS
186    absl::synchronization
187    absl::time
188    GTest::gmock_main
189)
190
191# Internal-only target, do not depend on directly.
192absl_cc_library(
193  NAME
194    per_thread_sem_test_common
195  SRCS
196    "internal/per_thread_sem_test.cc"
197  COPTS
198    ${ABSL_TEST_COPTS}
199  DEPS
200    absl::synchronization
201    absl::base
202    absl::config
203    absl::strings
204    absl::time
205    GTest::gmock
206  TESTONLY
207)
208
209absl_cc_test(
210  NAME
211    per_thread_sem_test
212  SRCS
213    "internal/per_thread_sem_test.cc"
214  COPTS
215    ${ABSL_TEST_COPTS}
216  DEPS
217    absl::per_thread_sem_test_common
218    absl::synchronization
219    absl::strings
220    absl::time
221    GTest::gmock_main
222)
223
224absl_cc_test(
225  NAME
226    lifetime_test
227  SRCS
228    "lifetime_test.cc"
229  COPTS
230    ${ABSL_TEST_COPTS}
231  DEPS
232    absl::synchronization
233    absl::core_headers
234    absl::raw_logging_internal
235)
236