tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CMakeLists.txt (13832B)


      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 find_library(LIBRT rt)
     18 
     19 # Internal-only target, do not depend on directly.
     20 absl_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.
     33 absl_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 
     44 absl_cc_library(
     45  NAME
     46    log_severity
     47  HDRS
     48    "log_severity.h"
     49  SRCS
     50    "log_severity.cc"
     51  DEPS
     52    absl::config
     53    absl::core_headers
     54  COPTS
     55    ${ABSL_DEFAULT_COPTS}
     56 )
     57 
     58 absl_cc_library(
     59  NAME
     60    no_destructor
     61  HDRS
     62    "no_destructor.h"
     63  DEPS
     64    absl::config
     65    absl::nullability
     66  COPTS
     67    ${ABSL_DEFAULT_COPTS}
     68 )
     69 
     70 absl_cc_library(
     71  NAME
     72    nullability
     73  HDRS
     74    "nullability.h"
     75  SRCS
     76    "internal/nullability_impl.h"
     77  DEPS
     78    absl::config
     79    absl::core_headers
     80    absl::type_traits
     81  COPTS
     82    ${ABSL_DEFAULT_COPTS}
     83 )
     84 
     85 absl_cc_test(
     86  NAME
     87    nullability_test
     88  SRCS
     89    "nullability_test.cc"
     90  COPTS
     91    ${ABSL_TEST_COPTS}
     92  DEPS
     93    absl::core_headers
     94    absl::nullability
     95    GTest::gtest_main
     96 )
     97 
     98 absl_cc_test(
     99  NAME
    100    nullability_default_nonnull_test
    101  SRCS
    102    "nullability_default_nonnull_test.cc"
    103  COPTS
    104    ${ABSL_TEST_COPTS}
    105  DEPS
    106    absl::nullability
    107    GTest::gtest_main
    108 )
    109 
    110 # Internal-only target, do not depend on directly.
    111 absl_cc_library(
    112  NAME
    113    raw_logging_internal
    114  HDRS
    115    "internal/raw_logging.h"
    116  SRCS
    117    "internal/raw_logging.cc"
    118  DEPS
    119    absl::atomic_hook
    120    absl::config
    121    absl::core_headers
    122    absl::errno_saver
    123    absl::log_severity
    124  COPTS
    125    ${ABSL_DEFAULT_COPTS}
    126 )
    127 
    128 # Internal-only target, do not depend on directly.
    129 absl_cc_library(
    130  NAME
    131    spinlock_wait
    132  HDRS
    133    "internal/spinlock_wait.h"
    134  SRCS
    135    "internal/spinlock_akaros.inc"
    136    "internal/spinlock_linux.inc"
    137    "internal/spinlock_posix.inc"
    138    "internal/spinlock_wait.cc"
    139    "internal/spinlock_win32.inc"
    140  COPTS
    141    ${ABSL_DEFAULT_COPTS}
    142  DEPS
    143    absl::base_internal
    144    absl::core_headers
    145    absl::errno_saver
    146 )
    147 
    148 absl_cc_library(
    149  NAME
    150    config
    151  HDRS
    152    "config.h"
    153    "options.h"
    154    "policy_checks.h"
    155  COPTS
    156    ${ABSL_DEFAULT_COPTS}
    157  PUBLIC
    158 )
    159 
    160 absl_cc_library(
    161  NAME
    162    dynamic_annotations
    163  HDRS
    164    "dynamic_annotations.h"
    165  COPTS
    166    ${ABSL_DEFAULT_COPTS}
    167  DEPS
    168    absl::config
    169  PUBLIC
    170 )
    171 
    172 absl_cc_library(
    173  NAME
    174    core_headers
    175  HDRS
    176    "attributes.h"
    177    "const_init.h"
    178    "macros.h"
    179    "optimization.h"
    180    "port.h"
    181    "thread_annotations.h"
    182  COPTS
    183    ${ABSL_DEFAULT_COPTS}
    184  DEPS
    185    absl::config
    186  PUBLIC
    187 )
    188 
    189 # Internal-only target, do not depend on directly.
    190 absl_cc_library(
    191  NAME
    192    malloc_internal
    193  HDRS
    194    "internal/direct_mmap.h"
    195    "internal/low_level_alloc.h"
    196  SRCS
    197    "internal/low_level_alloc.cc"
    198  COPTS
    199    ${ABSL_DEFAULT_COPTS}
    200  DEPS
    201    absl::base
    202    absl::base_internal
    203    absl::config
    204    absl::core_headers
    205    absl::dynamic_annotations
    206    absl::raw_logging_internal
    207    Threads::Threads
    208 )
    209 
    210 # Internal-only target, do not depend on directly.
    211 absl_cc_library(
    212  NAME
    213    base_internal
    214  HDRS
    215    "internal/hide_ptr.h"
    216    "internal/identity.h"
    217    "internal/scheduling_mode.h"
    218  COPTS
    219    ${ABSL_DEFAULT_COPTS}
    220  DEPS
    221    absl::config
    222    absl::type_traits
    223 )
    224 
    225 absl_cc_library(
    226  NAME
    227    base
    228  HDRS
    229    "call_once.h"
    230    "casts.h"
    231    "internal/cycleclock.h"
    232    "internal/cycleclock_config.h"
    233    "internal/low_level_scheduling.h"
    234    "internal/per_thread_tls.h"
    235    "internal/spinlock.h"
    236    "internal/sysinfo.h"
    237    "internal/thread_identity.h"
    238    "internal/tsan_mutex_interface.h"
    239    "internal/unscaledcycleclock.h"
    240    "internal/unscaledcycleclock_config.h"
    241  SRCS
    242    "internal/cycleclock.cc"
    243    "internal/spinlock.cc"
    244    "internal/sysinfo.cc"
    245    "internal/thread_identity.cc"
    246    "internal/unscaledcycleclock.cc"
    247  COPTS
    248    ${ABSL_DEFAULT_COPTS}
    249  LINKOPTS
    250    ${ABSL_DEFAULT_LINKOPTS}
    251    $<$<BOOL:${LIBRT}>:-lrt>
    252    $<$<BOOL:${MINGW}>:-ladvapi32>
    253  DEPS
    254    absl::atomic_hook
    255    absl::base_internal
    256    absl::config
    257    absl::core_headers
    258    absl::dynamic_annotations
    259    absl::log_severity
    260    absl::nullability
    261    absl::raw_logging_internal
    262    absl::spinlock_wait
    263    absl::type_traits
    264    Threads::Threads
    265  PUBLIC
    266 )
    267 
    268 # Internal-only target, do not depend on directly.
    269 absl_cc_library(
    270  NAME
    271    throw_delegate
    272  HDRS
    273    "internal/throw_delegate.h"
    274  SRCS
    275    "internal/throw_delegate.cc"
    276  COPTS
    277    ${ABSL_DEFAULT_COPTS}
    278  DEPS
    279    absl::config
    280    absl::raw_logging_internal
    281 )
    282 
    283 # Internal-only target, do not depend on directly.
    284 absl_cc_library(
    285  NAME
    286    exception_testing
    287  HDRS
    288    "internal/exception_testing.h"
    289  COPTS
    290    ${ABSL_DEFAULT_COPTS}
    291  DEPS
    292    absl::config
    293    GTest::gtest
    294  TESTONLY
    295 )
    296 
    297 # Internal-only target, do not depend on directly.
    298 absl_cc_library(
    299  NAME
    300    pretty_function
    301  HDRS
    302    "internal/pretty_function.h"
    303  COPTS
    304    ${ABSL_DEFAULT_COPTS}
    305 )
    306 
    307 # Internal-only target, do not depend on directly.
    308 absl_cc_library(
    309  NAME
    310    exception_safety_testing
    311  HDRS
    312    "internal/exception_safety_testing.h"
    313  SRCS
    314    "internal/exception_safety_testing.cc"
    315  COPTS
    316    ${ABSL_TEST_COPTS}
    317  DEPS
    318    absl::config
    319    absl::pretty_function
    320    absl::memory
    321    absl::meta
    322    absl::strings
    323    absl::utility
    324    GTest::gtest
    325  TESTONLY
    326 )
    327 
    328 absl_cc_test(
    329  NAME
    330    absl_exception_safety_testing_test
    331  SRCS
    332    "exception_safety_testing_test.cc"
    333  COPTS
    334    ${ABSL_TEST_COPTS}
    335  DEPS
    336    absl::exception_safety_testing
    337    absl::memory
    338    GTest::gtest_main
    339 )
    340 
    341 # Internal-only target, do not depend on directly.
    342 absl_cc_library(
    343  NAME
    344    atomic_hook_test_helper
    345  SRCS
    346    "internal/atomic_hook_test_helper.cc"
    347  COPTS
    348    ${ABSL_TEST_COPTS}
    349  DEPS
    350    absl::atomic_hook
    351    absl::core_headers
    352  TESTONLY
    353 )
    354 
    355 absl_cc_test(
    356  NAME
    357    atomic_hook_test
    358  SRCS
    359    "internal/atomic_hook_test.cc"
    360  COPTS
    361    ${ABSL_TEST_COPTS}
    362  DEPS
    363    absl::atomic_hook_test_helper
    364    absl::atomic_hook
    365    absl::core_headers
    366    GTest::gmock
    367    GTest::gtest_main
    368 )
    369 
    370 absl_cc_test(
    371  NAME
    372    attributes_test
    373  SRCS
    374    "attributes_test.cc"
    375  COPTS
    376    ${ABSL_TEST_COPTS}
    377  DEPS
    378    absl::config
    379    absl::core_headers
    380    GTest::gtest_main
    381 )
    382 
    383 absl_cc_test(
    384  NAME
    385    bit_cast_test
    386  SRCS
    387    "bit_cast_test.cc"
    388  COPTS
    389    ${ABSL_TEST_COPTS}
    390  DEPS
    391    absl::base
    392    absl::core_headers
    393    GTest::gtest_main
    394 )
    395 
    396 absl_cc_test(
    397  NAME
    398    errno_saver_test
    399  SRCS
    400    "internal/errno_saver_test.cc"
    401  COPTS
    402    ${ABSL_TEST_COPTS}
    403  DEPS
    404    absl::errno_saver
    405    absl::strerror
    406    GTest::gmock
    407    GTest::gtest_main
    408 )
    409 
    410 absl_cc_test(
    411  NAME
    412    throw_delegate_test
    413  SRCS
    414    "throw_delegate_test.cc"
    415  COPTS
    416    ${ABSL_TEST_COPTS}
    417  DEPS
    418    absl::base
    419    absl::config
    420    absl::throw_delegate
    421    GTest::gtest_main
    422 )
    423 
    424 # Internal-only target, do not depend on directly.
    425 absl_cc_library(
    426  NAME
    427    spinlock_test_common
    428  SRCS
    429    "spinlock_test_common.cc"
    430  COPTS
    431    ${ABSL_TEST_COPTS}
    432  DEPS
    433    absl::base
    434    absl::config
    435    absl::base_internal
    436    absl::core_headers
    437    absl::synchronization
    438    GTest::gtest
    439  TESTONLY
    440 )
    441 
    442 # On bazel BUILD this target use "alwayslink = 1" which is not implemented here
    443 absl_cc_test(
    444  NAME
    445    spinlock_test
    446  SRCS
    447    "spinlock_test_common.cc"
    448  COPTS
    449    ${ABSL_TEST_COPTS}
    450  DEPS
    451    absl::base
    452    absl::base_internal
    453    absl::config
    454    absl::core_headers
    455    absl::synchronization
    456    GTest::gtest_main
    457 )
    458 
    459 # Internal-only target, do not depend on directly.
    460 absl_cc_library(
    461  NAME
    462    endian
    463  HDRS
    464    "internal/endian.h"
    465    "internal/unaligned_access.h"
    466  COPTS
    467    ${ABSL_DEFAULT_COPTS}
    468  DEPS
    469    absl::base
    470    absl::config
    471    absl::core_headers
    472    absl::nullability
    473  PUBLIC
    474 )
    475 
    476 absl_cc_test(
    477  NAME
    478    endian_test
    479  SRCS
    480    "internal/endian_test.cc"
    481  COPTS
    482    ${ABSL_TEST_COPTS}
    483  DEPS
    484    absl::base
    485    absl::config
    486    absl::endian
    487    GTest::gtest_main
    488 )
    489 
    490 absl_cc_test(
    491  NAME
    492    config_test
    493  SRCS
    494    "config_test.cc"
    495  COPTS
    496    ${ABSL_TEST_COPTS}
    497  DEPS
    498    absl::config
    499    absl::synchronization
    500    GTest::gtest_main
    501 )
    502 
    503 absl_cc_test(
    504  NAME
    505    call_once_test
    506  SRCS
    507    "call_once_test.cc"
    508  COPTS
    509    ${ABSL_TEST_COPTS}
    510  DEPS
    511    absl::base
    512    absl::core_headers
    513    absl::synchronization
    514    GTest::gtest_main
    515 )
    516 
    517 absl_cc_test(
    518  NAME
    519    no_destructor_test
    520  SRCS
    521    "no_destructor_test.cc"
    522  COPTS
    523    ${ABSL_TEST_COPTS}
    524  DEPS
    525    absl::no_destructor
    526    absl::config
    527    absl::raw_logging_internal
    528    GTest::gmock
    529    GTest::gtest_main
    530 )
    531 
    532 absl_cc_test(
    533  NAME
    534    raw_logging_test
    535  SRCS
    536    "raw_logging_test.cc"
    537  COPTS
    538    ${ABSL_TEST_COPTS}
    539  DEPS
    540    absl::raw_logging_internal
    541    absl::strings
    542    GTest::gtest_main
    543 )
    544 
    545 absl_cc_test(
    546  NAME
    547    sysinfo_test
    548  SRCS
    549    "internal/sysinfo_test.cc"
    550  COPTS
    551    ${ABSL_TEST_COPTS}
    552  DEPS
    553    absl::base
    554    absl::synchronization
    555    GTest::gtest_main
    556 )
    557 
    558 absl_cc_test(
    559  NAME
    560    low_level_alloc_test
    561  SRCS
    562    "internal/low_level_alloc_test.cc"
    563  COPTS
    564    ${ABSL_TEST_COPTS}
    565  DEPS
    566    absl::malloc_internal
    567    absl::node_hash_map
    568    Threads::Threads
    569 )
    570 
    571 absl_cc_test(
    572  NAME
    573    thread_identity_test
    574  SRCS
    575    "internal/thread_identity_test.cc"
    576  COPTS
    577    ${ABSL_TEST_COPTS}
    578  DEPS
    579    absl::base
    580    absl::core_headers
    581    absl::synchronization
    582    Threads::Threads
    583    GTest::gtest_main
    584 )
    585 
    586 # Internal-only target, do not depend on directly.
    587 absl_cc_library(
    588  NAME
    589    scoped_set_env
    590  SRCS
    591    "internal/scoped_set_env.cc"
    592  HDRS
    593    "internal/scoped_set_env.h"
    594  COPTS
    595    ${ABSL_DEFAULT_COPTS}
    596  DEPS
    597    absl::config
    598    absl::raw_logging_internal
    599 )
    600 
    601 absl_cc_test(
    602  NAME
    603    scoped_set_env_test
    604  SRCS
    605    "internal/scoped_set_env_test.cc"
    606  COPTS
    607    ${ABSL_TEST_COPTS}
    608  DEPS
    609    absl::scoped_set_env
    610    GTest::gtest_main
    611 )
    612 
    613 absl_cc_test(
    614  NAME
    615    cmake_thread_test
    616  SRCS
    617    "internal/cmake_thread_test.cc"
    618  COPTS
    619    ${ABSL_TEST_COPTS}
    620  DEPS
    621    absl::base
    622 )
    623 
    624 absl_cc_test(
    625  NAME
    626    log_severity_test
    627  SRCS
    628    "log_severity_test.cc"
    629  DEPS
    630    absl::flags_internal
    631    absl::flags_marshalling
    632    absl::log_severity
    633    absl::strings
    634    GTest::gmock
    635    GTest::gtest_main
    636 )
    637 
    638 # Internal-only target, do not depend on directly.
    639 absl_cc_library(
    640  NAME
    641    strerror
    642  SRCS
    643    "internal/strerror.cc"
    644  HDRS
    645    "internal/strerror.h"
    646  COPTS
    647    ${ABSL_DEFAULT_COPTS}
    648  LINKOPTS
    649    ${ABSL_DEFAULT_LINKOPTS}
    650  DEPS
    651    absl::config
    652    absl::core_headers
    653    absl::errno_saver
    654 )
    655 
    656 absl_cc_test(
    657  NAME
    658    strerror_test
    659  SRCS
    660    "internal/strerror_test.cc"
    661  COPTS
    662    ${ABSL_TEST_COPTS}
    663  DEPS
    664    absl::strerror
    665    absl::strings
    666    GTest::gmock
    667    GTest::gtest_main
    668 )
    669 
    670 # Internal-only target, do not depend on directly.
    671 absl_cc_library(
    672  NAME
    673    fast_type_id
    674  HDRS
    675    "internal/fast_type_id.h"
    676  COPTS
    677    ${ABSL_DEFAULT_COPTS}
    678  LINKOPTS
    679    ${ABSL_DEFAULT_LINKOPTS}
    680  DEPS
    681    absl::config
    682 )
    683 
    684 absl_cc_test(
    685  NAME
    686    fast_type_id_test
    687  SRCS
    688    "internal/fast_type_id_test.cc"
    689  COPTS
    690    ${ABSL_TEST_COPTS}
    691  DEPS
    692    absl::fast_type_id
    693    GTest::gtest_main
    694 )
    695 
    696 absl_cc_library(
    697  NAME
    698    prefetch
    699  HDRS
    700    "prefetch.h"
    701  COPTS
    702    ${ABSL_DEFAULT_COPTS}
    703  LINKOPTS
    704    ${ABSL_DEFAULT_LINKOPTS}
    705  DEPS
    706    absl::config
    707    absl::core_headers
    708 )
    709 
    710 absl_cc_test(
    711  NAME
    712    prefetch_test
    713  SRCS
    714    "prefetch_test.cc"
    715  COPTS
    716    ${ABSL_TEST_COPTS}
    717  DEPS
    718    absl::prefetch
    719    GTest::gtest_main
    720 )
    721 
    722 absl_cc_test(
    723  NAME
    724    optimization_test
    725  SRCS
    726    "optimization_test.cc"
    727  COPTS
    728    ${ABSL_TEST_COPTS}
    729  DEPS
    730    absl::core_headers
    731    absl::optional
    732    GTest::gtest_main
    733 )
    734 
    735 absl_cc_library(
    736  NAME
    737    poison
    738  SRCS
    739    "internal/poison.cc"
    740  HDRS
    741    "internal/poison.h"
    742  COPTS
    743    ${ABSL_DEFAULT_COPTS}
    744  LINKOPTS
    745    ${ABSL_DEFAULT_LINKOPTS}
    746  DEPS
    747    absl::config
    748    absl::core_headers
    749    absl::malloc_internal
    750 )
    751 
    752 absl_cc_test(
    753  NAME
    754    poison_test
    755  SRCS
    756    "internal/poison_test.cc"
    757  COPTS
    758    ${ABSL_TEST_COPTS}
    759  DEPS
    760    absl::config
    761    absl::poison
    762    GTest::gtest_main
    763 )
    764 
    765 absl_cc_library(
    766  NAME
    767    tracing_internal
    768  HDRS
    769    "internal/tracing.h"
    770  SRCS
    771    "internal/tracing.cc"
    772  COPTS
    773    ${ABSL_DEFAULT_COPTS}
    774  DEPS
    775    absl::base
    776 )
    777 
    778 absl_cc_test(
    779  NAME
    780    tracing_internal_weak_test
    781  SRCS
    782    "internal/tracing_weak_test.cc"
    783  COPTS
    784    ${ABSL_TEST_COPTS}
    785  DEPS
    786    absl::base
    787    absl::tracing_internal
    788    GTest::gtest_main
    789 )
    790 
    791 absl_cc_test(
    792  NAME
    793    tracing_internal_strong_test
    794  SRCS
    795    "internal/tracing_strong_test.cc"
    796  COPTS
    797    ${ABSL_TEST_COPTS}
    798  DEPS
    799    absl::base
    800    absl::tracing_internal
    801    GTest::gtest_main
    802 )
    803 
    804 # Internal-only target, do not depend on directly.
    805 absl_cc_library(
    806  NAME
    807    iterator_traits_internal
    808  HDRS
    809    "internal/iterator_traits.h"
    810  COPTS
    811    ${ABSL_DEFAULT_COPTS}
    812  DEPS
    813    absl::config
    814    absl::type_traits
    815  PUBLIC
    816 )
    817 
    818 absl_cc_test(
    819  NAME
    820    iterator_traits_test
    821  SRCS
    822    "internal/iterator_traits_test.cc"
    823  COPTS
    824    ${ABSL_TEST_COPTS}
    825  DEPS
    826    absl::config
    827    absl::iterator_traits_internal
    828    absl::iterator_traits_test_helper_internal
    829    GTest::gtest_main
    830 )
    831 
    832 # Internal-only target, do not depend on directly.
    833 absl_cc_library(
    834  NAME
    835    iterator_traits_test_helper_internal
    836  HDRS
    837    "internal/iterator_traits_test_helper.h"
    838  COPTS
    839    ${ABSL_DEFAULT_COPTS}
    840  DEPS
    841    absl::config
    842  PUBLIC
    843 )