• 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
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
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_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    gmock
304    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_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    gmock
331    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_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_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    gmock
375    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
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_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::config
422    absl::core_headers
423  PUBLIC
424)
425
426absl_cc_test(
427  NAME
428    endian_test
429  SRCS
430    "internal/endian_test.cc"
431  COPTS
432    ${ABSL_TEST_COPTS}
433  DEPS
434    absl::base
435    absl::config
436    absl::endian
437    gtest_main
438)
439
440absl_cc_test(
441  NAME
442    config_test
443  SRCS
444    "config_test.cc"
445  COPTS
446    ${ABSL_TEST_COPTS}
447  DEPS
448    absl::config
449    absl::synchronization
450    gtest_main
451)
452
453absl_cc_test(
454  NAME
455    call_once_test
456  SRCS
457    "call_once_test.cc"
458  COPTS
459    ${ABSL_TEST_COPTS}
460  DEPS
461    absl::base
462    absl::core_headers
463    absl::synchronization
464    gtest_main
465)
466
467absl_cc_test(
468  NAME
469    raw_logging_test
470  SRCS
471    "raw_logging_test.cc"
472  COPTS
473    ${ABSL_TEST_COPTS}
474  DEPS
475    absl::raw_logging_internal
476    absl::strings
477    gtest_main
478)
479
480absl_cc_test(
481  NAME
482    sysinfo_test
483  SRCS
484    "internal/sysinfo_test.cc"
485  COPTS
486    ${ABSL_TEST_COPTS}
487  DEPS
488    absl::base
489    absl::synchronization
490    gtest_main
491)
492
493absl_cc_test(
494  NAME
495    low_level_alloc_test
496  SRCS
497    "internal/low_level_alloc_test.cc"
498  COPTS
499    ${ABSL_TEST_COPTS}
500  DEPS
501    absl::malloc_internal
502    absl::node_hash_map
503    Threads::Threads
504)
505
506absl_cc_test(
507  NAME
508    thread_identity_test
509  SRCS
510    "internal/thread_identity_test.cc"
511  COPTS
512    ${ABSL_TEST_COPTS}
513  DEPS
514    absl::base
515    absl::core_headers
516    absl::synchronization
517    Threads::Threads
518    gtest_main
519)
520
521absl_cc_library(
522  NAME
523    bits
524  HDRS
525    "internal/bits.h"
526  COPTS
527    ${ABSL_DEFAULT_COPTS}
528  DEPS
529    absl::config
530    absl::core_headers
531)
532
533absl_cc_test(
534  NAME
535    bits_test
536  SRCS
537    "internal/bits_test.cc"
538  COPTS
539    ${ABSL_TEST_COPTS}
540  DEPS
541    absl::bits
542    gtest_main
543)
544
545absl_cc_library(
546  NAME
547    exponential_biased
548  SRCS
549    "internal/exponential_biased.cc"
550  HDRS
551    "internal/exponential_biased.h"
552  COPTS
553    ${ABSL_DEFAULT_COPTS}
554  DEPS
555    absl::config
556    absl::core_headers
557)
558
559absl_cc_test(
560  NAME
561    exponential_biased_test
562  SRCS
563    "internal/exponential_biased_test.cc"
564  COPTS
565    ${ABSL_TEST_COPTS}
566  DEPS
567    absl::exponential_biased
568    absl::strings
569    gmock_main
570)
571
572absl_cc_library(
573  NAME
574    periodic_sampler
575  SRCS
576    "internal/periodic_sampler.cc"
577  HDRS
578    "internal/periodic_sampler.h"
579  COPTS
580    ${ABSL_DEFAULT_COPTS}
581  DEPS
582    absl::core_headers
583    absl::exponential_biased
584)
585
586absl_cc_test(
587  NAME
588    periodic_sampler_test
589  SRCS
590    "internal/periodic_sampler_test.cc"
591  COPTS
592    ${ABSL_TEST_COPTS}
593  DEPS
594    absl::core_headers
595    absl::periodic_sampler
596    gmock_main
597)
598
599absl_cc_library(
600  NAME
601    scoped_set_env
602  SRCS
603    "internal/scoped_set_env.cc"
604  HDRS
605    "internal/scoped_set_env.h"
606  COPTS
607    ${ABSL_DEFAULT_COPTS}
608  DEPS
609    absl::config
610    absl::raw_logging_internal
611)
612
613absl_cc_test(
614  NAME
615    scoped_set_env_test
616  SRCS
617    "internal/scoped_set_env_test.cc"
618  COPTS
619    ${ABSL_TEST_COPTS}
620  DEPS
621    absl::scoped_set_env
622    gtest_main
623)
624
625absl_cc_test(
626  NAME
627    cmake_thread_test
628  SRCS
629    "internal/cmake_thread_test.cc"
630  COPTS
631    ${ABSL_TEST_COPTS}
632  DEPS
633    absl::base
634)
635
636absl_cc_test(
637  NAME
638    log_severity_test
639  SRCS
640    "log_severity_test.cc"
641  DEPS
642    absl::flags_internal
643    absl::flags_marshalling
644    absl::log_severity
645    absl::strings
646    gmock
647    gtest_main
648)
649
650absl_cc_library(
651  NAME
652    strerror
653  SRCS
654    "internal/strerror.cc"
655  HDRS
656    "internal/strerror.h"
657  COPTS
658    ${ABSL_DEFAULT_COPTS}
659  LINKOPTS
660    ${ABSL_DEFAULT_LINKOPTS}
661  DEPS
662    absl::config
663    absl::core_headers
664    absl::errno_saver
665)
666
667absl_cc_test(
668  NAME
669    strerror_test
670  SRCS
671    "internal/strerror_test.cc"
672  COPTS
673    ${ABSL_TEST_COPTS}
674  DEPS
675    absl::strerror
676    absl::strings
677    gmock
678    gtest_main
679)
680
681absl_cc_library(
682  NAME
683    fast_type_id
684  HDRS
685    "internal/fast_type_id.h"
686  COPTS
687    ${ABSL_DEFAULT_COPTS}
688  LINKOPTS
689    ${ABSL_DEFAULT_LINKOPTS}
690  DEPS
691    absl::config
692)
693
694absl_cc_test(
695  NAME
696    fast_type_id_test
697  SRCS
698    "internal/fast_type_id_test.cc"
699  COPTS
700    ${ABSL_TEST_COPTS}
701  DEPS
702    absl::fast_type_id
703    gtest_main
704)
705
706absl_cc_test(
707  NAME
708    optimization_test
709  SRCS
710    "optimization_test.cc"
711  COPTS
712    ${ABSL_TEST_COPTS}
713  DEPS
714    absl::core_headers
715    absl::optional
716    gtest_main
717)
718