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