• 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
17find_library(LIBRT rt)
18
19absl_cc_library(
20  NAME
21    atomic_hook
22  HDRS
23    "internal/atomic_hook.h"
24  DEPS
25    absl::config
26    absl::core_headers
27  COPTS
28    ${ABSL_DEFAULT_COPTS}
29)
30
31absl_cc_library(
32  NAME
33    errno_saver
34  HDRS
35    "internal/errno_saver.h"
36  DEPS
37    absl::config
38  COPTS
39    ${ABSL_DEFAULT_COPTS}
40)
41
42absl_cc_library(
43  NAME
44    log_severity
45  HDRS
46    "log_severity.h"
47  SRCS
48    "log_severity.cc"
49  DEPS
50    absl::core_headers
51  COPTS
52    ${ABSL_DEFAULT_COPTS}
53)
54
55absl_cc_library(
56  NAME
57    raw_logging_internal
58  HDRS
59    "internal/raw_logging.h"
60  SRCS
61    "internal/raw_logging.cc"
62  DEPS
63    absl::atomic_hook
64    absl::config
65    absl::core_headers
66    absl::log_severity
67  COPTS
68    ${ABSL_DEFAULT_COPTS}
69)
70
71absl_cc_library(
72  NAME
73    spinlock_wait
74  HDRS
75    "internal/spinlock_wait.h"
76  SRCS
77    "internal/spinlock_akaros.inc"
78    "internal/spinlock_linux.inc"
79    "internal/spinlock_posix.inc"
80    "internal/spinlock_wait.cc"
81    "internal/spinlock_win32.inc"
82  COPTS
83    ${ABSL_DEFAULT_COPTS}
84  DEPS
85    absl::base_internal
86    absl::core_headers
87    absl::errno_saver
88)
89
90absl_cc_library(
91  NAME
92    config
93  HDRS
94    "config.h"
95    "options.h"
96    "policy_checks.h"
97  COPTS
98    ${ABSL_DEFAULT_COPTS}
99  PUBLIC
100)
101
102absl_cc_library(
103  NAME
104    dynamic_annotations
105  HDRS
106    "dynamic_annotations.h"
107  SRCS
108    "internal/dynamic_annotations.h"
109  COPTS
110    ${ABSL_DEFAULT_COPTS}
111  DEPS
112    absl::config
113  PUBLIC
114)
115
116absl_cc_library(
117  NAME
118    core_headers
119  HDRS
120    "attributes.h"
121    "const_init.h"
122    "macros.h"
123    "optimization.h"
124    "port.h"
125    "thread_annotations.h"
126    "internal/thread_annotations.h"
127  COPTS
128    ${ABSL_DEFAULT_COPTS}
129  DEPS
130    absl::config
131  PUBLIC
132)
133
134absl_cc_library(
135  NAME
136    malloc_internal
137  HDRS
138    "internal/direct_mmap.h"
139    "internal/low_level_alloc.h"
140  SRCS
141    "internal/low_level_alloc.cc"
142  COPTS
143    ${ABSL_DEFAULT_COPTS}
144  DEPS
145    absl::base
146    absl::base_internal
147    absl::config
148    absl::core_headers
149    absl::dynamic_annotations
150    absl::raw_logging_internal
151    Threads::Threads
152)
153
154absl_cc_library(
155  NAME
156    base_internal
157  HDRS
158    "internal/hide_ptr.h"
159    "internal/identity.h"
160    "internal/inline_variable.h"
161    "internal/invoke.h"
162    "internal/scheduling_mode.h"
163  COPTS
164    ${ABSL_DEFAULT_COPTS}
165  DEPS
166    absl::config
167    absl::type_traits
168)
169
170absl_cc_library(
171  NAME
172    base
173  HDRS
174    "call_once.h"
175    "casts.h"
176    "internal/cycleclock.h"
177    "internal/low_level_scheduling.h"
178    "internal/per_thread_tls.h"
179    "internal/spinlock.h"
180    "internal/sysinfo.h"
181    "internal/thread_identity.h"
182    "internal/tsan_mutex_interface.h"
183    "internal/unscaledcycleclock.h"
184  SRCS
185    "internal/cycleclock.cc"
186    "internal/spinlock.cc"
187    "internal/sysinfo.cc"
188    "internal/thread_identity.cc"
189    "internal/unscaledcycleclock.cc"
190  COPTS
191    ${ABSL_DEFAULT_COPTS}
192  LINKOPTS
193    ${ABSL_DEFAULT_LINKOPTS}
194    $<$<BOOL:${LIBRT}>:-lrt>
195    $<$<BOOL:${MINGW}>:"advapi32">
196  DEPS
197    absl::atomic_hook
198    absl::base_internal
199    absl::config
200    absl::core_headers
201    absl::dynamic_annotations
202    absl::log_severity
203    absl::raw_logging_internal
204    absl::spinlock_wait
205    absl::type_traits
206    Threads::Threads
207  PUBLIC
208)
209
210absl_cc_library(
211  NAME
212    throw_delegate
213  HDRS
214    "internal/throw_delegate.h"
215  SRCS
216    "internal/throw_delegate.cc"
217  COPTS
218    ${ABSL_DEFAULT_COPTS}
219  DEPS
220    absl::config
221    absl::raw_logging_internal
222)
223
224absl_cc_library(
225  NAME
226    exception_testing
227  HDRS
228    "internal/exception_testing.h"
229  COPTS
230    ${ABSL_DEFAULT_COPTS}
231  DEPS
232    absl::config
233    GTest::gtest
234  TESTONLY
235)
236
237absl_cc_library(
238  NAME
239    pretty_function
240  HDRS
241    "internal/pretty_function.h"
242  COPTS
243    ${ABSL_DEFAULT_COPTS}
244)
245
246absl_cc_library(
247  NAME
248    exception_safety_testing
249  HDRS
250    "internal/exception_safety_testing.h"
251  SRCS
252    "internal/exception_safety_testing.cc"
253  COPTS
254    ${ABSL_TEST_COPTS}
255  DEPS
256    absl::config
257    absl::pretty_function
258    absl::memory
259    absl::meta
260    absl::strings
261    absl::utility
262    GTest::gtest
263  TESTONLY
264)
265
266absl_cc_test(
267  NAME
268    absl_exception_safety_testing_test
269  SRCS
270    "exception_safety_testing_test.cc"
271  COPTS
272    ${ABSL_TEST_COPTS}
273  DEPS
274    absl::exception_safety_testing
275    absl::memory
276    GTest::gtest_main
277)
278
279absl_cc_library(
280  NAME
281    atomic_hook_test_helper
282  SRCS
283    "internal/atomic_hook_test_helper.cc"
284  COPTS
285    ${ABSL_TEST_COPTS}
286  DEPS
287    absl::atomic_hook
288    absl::core_headers
289  TESTONLY
290)
291
292absl_cc_test(
293  NAME
294    atomic_hook_test
295  SRCS
296    "internal/atomic_hook_test.cc"
297  COPTS
298    ${ABSL_TEST_COPTS}
299  DEPS
300    absl::atomic_hook_test_helper
301    absl::atomic_hook
302    absl::core_headers
303    GTest::gmock
304    GTest::gtest_main
305)
306
307absl_cc_test(
308  NAME
309    bit_cast_test
310  SRCS
311    "bit_cast_test.cc"
312  COPTS
313    ${ABSL_TEST_COPTS}
314  DEPS
315    absl::base
316    absl::core_headers
317    GTest::gtest_main
318)
319
320absl_cc_test(
321  NAME
322    errno_saver_test
323  SRCS
324    "internal/errno_saver_test.cc"
325  COPTS
326    ${ABSL_TEST_COPTS}
327  DEPS
328    absl::errno_saver
329    absl::strerror
330    GTest::gmock
331    GTest::gtest_main
332)
333
334absl_cc_test(
335  NAME
336    throw_delegate_test
337  SRCS
338    "throw_delegate_test.cc"
339  COPTS
340    ${ABSL_TEST_COPTS}
341  DEPS
342    absl::base
343    absl::config
344    absl::throw_delegate
345    GTest::gtest_main
346)
347
348absl_cc_test(
349  NAME
350    inline_variable_test
351  SRCS
352    "internal/inline_variable_testing.h"
353    "inline_variable_test.cc"
354    "inline_variable_test_a.cc"
355    "inline_variable_test_b.cc"
356  COPTS
357    ${ABSL_TEST_COPTS}
358  DEPS
359    absl::base_internal
360    GTest::gtest_main
361)
362
363absl_cc_test(
364  NAME
365    invoke_test
366  SRCS
367    "invoke_test.cc"
368  COPTS
369    ${ABSL_TEST_COPTS}
370  DEPS
371    absl::base_internal
372    absl::memory
373    absl::strings
374    GTest::gmock
375    GTest::gtest_main
376)
377
378absl_cc_library(
379  NAME
380    spinlock_test_common
381  SRCS
382    "spinlock_test_common.cc"
383  COPTS
384    ${ABSL_TEST_COPTS}
385  DEPS
386    absl::base
387    absl::config
388    absl::base_internal
389    absl::core_headers
390    absl::synchronization
391    GTest::gtest
392  TESTONLY
393)
394
395# On bazel BUILD this target use "alwayslink = 1" which is not implemented here
396absl_cc_test(
397  NAME
398    spinlock_test
399  SRCS
400    "spinlock_test_common.cc"
401  COPTS
402    ${ABSL_TEST_COPTS}
403  DEPS
404    absl::base
405    absl::base_internal
406    absl::config
407    absl::core_headers
408    absl::synchronization
409    GTest::gtest_main
410)
411
412absl_cc_library(
413  NAME
414    endian
415  HDRS
416    "internal/endian.h"
417    "internal/unaligned_access.h"
418  COPTS
419    ${ABSL_DEFAULT_COPTS}
420  DEPS
421    absl::base
422    absl::config
423    absl::core_headers
424  PUBLIC
425)
426
427absl_cc_test(
428  NAME
429    endian_test
430  SRCS
431    "internal/endian_test.cc"
432  COPTS
433    ${ABSL_TEST_COPTS}
434  DEPS
435    absl::base
436    absl::config
437    absl::endian
438    GTest::gtest_main
439)
440
441absl_cc_test(
442  NAME
443    config_test
444  SRCS
445    "config_test.cc"
446  COPTS
447    ${ABSL_TEST_COPTS}
448  DEPS
449    absl::config
450    absl::synchronization
451    GTest::gtest_main
452)
453
454absl_cc_test(
455  NAME
456    call_once_test
457  SRCS
458    "call_once_test.cc"
459  COPTS
460    ${ABSL_TEST_COPTS}
461  DEPS
462    absl::base
463    absl::core_headers
464    absl::synchronization
465    GTest::gtest_main
466)
467
468absl_cc_test(
469  NAME
470    raw_logging_test
471  SRCS
472    "raw_logging_test.cc"
473  COPTS
474    ${ABSL_TEST_COPTS}
475  DEPS
476    absl::raw_logging_internal
477    absl::strings
478    GTest::gtest_main
479)
480
481absl_cc_test(
482  NAME
483    sysinfo_test
484  SRCS
485    "internal/sysinfo_test.cc"
486  COPTS
487    ${ABSL_TEST_COPTS}
488  DEPS
489    absl::base
490    absl::synchronization
491    GTest::gtest_main
492)
493
494absl_cc_test(
495  NAME
496    low_level_alloc_test
497  SRCS
498    "internal/low_level_alloc_test.cc"
499  COPTS
500    ${ABSL_TEST_COPTS}
501  DEPS
502    absl::malloc_internal
503    absl::node_hash_map
504    Threads::Threads
505)
506
507absl_cc_test(
508  NAME
509    thread_identity_test
510  SRCS
511    "internal/thread_identity_test.cc"
512  COPTS
513    ${ABSL_TEST_COPTS}
514  DEPS
515    absl::base
516    absl::core_headers
517    absl::synchronization
518    Threads::Threads
519    GTest::gtest_main
520)
521
522absl_cc_library(
523  NAME
524    exponential_biased
525  SRCS
526    "internal/exponential_biased.cc"
527  HDRS
528    "internal/exponential_biased.h"
529  COPTS
530    ${ABSL_DEFAULT_COPTS}
531  DEPS
532    absl::config
533    absl::core_headers
534)
535
536absl_cc_test(
537  NAME
538    exponential_biased_test
539  SRCS
540    "internal/exponential_biased_test.cc"
541  COPTS
542    ${ABSL_TEST_COPTS}
543  DEPS
544    absl::exponential_biased
545    absl::strings
546    GTest::gmock_main
547)
548
549absl_cc_library(
550  NAME
551    periodic_sampler
552  SRCS
553    "internal/periodic_sampler.cc"
554  HDRS
555    "internal/periodic_sampler.h"
556  COPTS
557    ${ABSL_DEFAULT_COPTS}
558  DEPS
559    absl::core_headers
560    absl::exponential_biased
561)
562
563absl_cc_test(
564  NAME
565    periodic_sampler_test
566  SRCS
567    "internal/periodic_sampler_test.cc"
568  COPTS
569    ${ABSL_TEST_COPTS}
570  DEPS
571    absl::core_headers
572    absl::periodic_sampler
573    GTest::gmock_main
574)
575
576absl_cc_library(
577  NAME
578    scoped_set_env
579  SRCS
580    "internal/scoped_set_env.cc"
581  HDRS
582    "internal/scoped_set_env.h"
583  COPTS
584    ${ABSL_DEFAULT_COPTS}
585  DEPS
586    absl::config
587    absl::raw_logging_internal
588)
589
590absl_cc_test(
591  NAME
592    scoped_set_env_test
593  SRCS
594    "internal/scoped_set_env_test.cc"
595  COPTS
596    ${ABSL_TEST_COPTS}
597  DEPS
598    absl::scoped_set_env
599    GTest::gtest_main
600)
601
602absl_cc_test(
603  NAME
604    cmake_thread_test
605  SRCS
606    "internal/cmake_thread_test.cc"
607  COPTS
608    ${ABSL_TEST_COPTS}
609  DEPS
610    absl::base
611)
612
613absl_cc_test(
614  NAME
615    log_severity_test
616  SRCS
617    "log_severity_test.cc"
618  DEPS
619    absl::flags_internal
620    absl::flags_marshalling
621    absl::log_severity
622    absl::strings
623    GTest::gmock
624    GTest::gtest_main
625)
626
627absl_cc_library(
628  NAME
629    strerror
630  SRCS
631    "internal/strerror.cc"
632  HDRS
633    "internal/strerror.h"
634  COPTS
635    ${ABSL_DEFAULT_COPTS}
636  LINKOPTS
637    ${ABSL_DEFAULT_LINKOPTS}
638  DEPS
639    absl::config
640    absl::core_headers
641    absl::errno_saver
642)
643
644absl_cc_test(
645  NAME
646    strerror_test
647  SRCS
648    "internal/strerror_test.cc"
649  COPTS
650    ${ABSL_TEST_COPTS}
651  DEPS
652    absl::strerror
653    absl::strings
654    GTest::gmock
655    GTest::gtest_main
656)
657
658absl_cc_library(
659  NAME
660    fast_type_id
661  HDRS
662    "internal/fast_type_id.h"
663  COPTS
664    ${ABSL_DEFAULT_COPTS}
665  LINKOPTS
666    ${ABSL_DEFAULT_LINKOPTS}
667  DEPS
668    absl::config
669)
670
671absl_cc_test(
672  NAME
673    fast_type_id_test
674  SRCS
675    "internal/fast_type_id_test.cc"
676  COPTS
677    ${ABSL_TEST_COPTS}
678  DEPS
679    absl::fast_type_id
680    GTest::gtest_main
681)
682
683absl_cc_test(
684  NAME
685    optimization_test
686  SRCS
687    "optimization_test.cc"
688  COPTS
689    ${ABSL_TEST_COPTS}
690  DEPS
691    absl::core_headers
692    absl::optional
693    GTest::gtest_main
694)
695