Home | History | Annotate | Download | only in base
      1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 {
      6   'variables': {
      7     'chromium_code': 1,
      8   },
      9   'includes': [
     10     'base.gypi',
     11   ],
     12   'targets': [
     13     {
     14       'target_name': 'base_i18n',
     15       'type': '<(library)',
     16       'msvs_guid': '968F3222-9798-4D21-BE08-15ECB5EF2994',
     17       'dependencies': [
     18         'base',
     19         '../third_party/icu/icu.gyp:icui18n',
     20         '../third_party/icu/icu.gyp:icuuc',
     21       ],
     22       'conditions': [
     23         ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
     24           'dependencies': [
     25             # i18n/rtl.cc uses gtk
     26             '../build/linux/system.gyp:gtk',
     27           ],
     28         }],
     29       ],
     30       'export_dependent_settings': [
     31         'base',
     32       ],
     33       'sources': [
     34         'i18n/bidi_line_iterator.cc',
     35         'i18n/bidi_line_iterator.h',
     36         'i18n/break_iterator.cc',
     37         'i18n/break_iterator.h',
     38         'i18n/char_iterator.cc',
     39         'i18n/char_iterator.h',
     40         'i18n/file_util_icu.cc',
     41         'i18n/file_util_icu.h',
     42         'i18n/icu_encoding_detection.cc',
     43         'i18n/icu_encoding_detection.h',
     44         'i18n/icu_string_conversions.cc',
     45         'i18n/icu_string_conversions.h',
     46         'i18n/icu_util.cc',
     47         'i18n/icu_util.h',
     48         'i18n/number_formatting.cc',
     49         'i18n/number_formatting.h',
     50         'i18n/rtl.cc',
     51         'i18n/rtl.h',
     52         'i18n/time_formatting.cc',
     53         'i18n/time_formatting.h',
     54       ],
     55     },
     56     {
     57       # This is the subset of files from base that should not be used with a
     58       # dynamic library.
     59       'target_name': 'base_static',
     60       'type': '<(library)',
     61       'sources': [
     62         'base_switches.cc',
     63         'base_switches.h',
     64         'win/pe_image.cc',
     65         'win/pe_image.h',
     66       ],
     67       'include_dirs': [
     68         '..',
     69       ],
     70     },
     71     {
     72       # TODO(rvargas): Remove this when gyp finally supports a clean model.
     73       # See bug 36232.
     74       'target_name': 'base_static_win64',
     75       'type': '<(library)',
     76       'sources': [
     77         'base_switches.cc',
     78         'base_switches.h',
     79         'win/pe_image.cc',
     80         'win/pe_image.h',
     81       ],
     82       'include_dirs': [
     83         '..',
     84       ],
     85       'configurations': {
     86         'Common_Base': {
     87           'msvs_target_platform': 'x64',
     88         },
     89       },
     90       'defines': [
     91         'NACL_WIN64',
     92       ],
     93       # TODO(rvargas): Bug 78117. Remove this.
     94       'msvs_disabled_warnings': [
     95         4244,
     96       ],
     97     },
     98     {
     99       'target_name': 'base_unittests',
    100       'type': 'executable',
    101       'msvs_guid': '27A30967-4BBA-48D1-8522-CDE95F7B1CEC',
    102       'sources': [
    103         # Infrastructure files.
    104         'test/run_all_unittests.cc',
    105 
    106         # Tests.
    107         'at_exit_unittest.cc',
    108         'atomicops_unittest.cc',
    109         'base64_unittest.cc',
    110         'bind_unittest.cc',
    111         'bits_unittest.cc',
    112         'callback_unittest.cc',
    113         'command_line_unittest.cc',
    114         'cpu_unittest.cc',
    115         'debug/leak_tracker_unittest.cc',
    116         'debug/stack_trace_unittest.cc',
    117         'debug/trace_event_win_unittest.cc',
    118         'dir_reader_posix_unittest.cc',
    119         'environment_unittest.cc',
    120         'file_descriptor_shuffle_unittest.cc',
    121         'file_path_unittest.cc',
    122         'file_util_unittest.cc',
    123         'file_version_info_unittest.cc',
    124         'gmock_unittest.cc',
    125         'id_map_unittest.cc',
    126         'i18n/break_iterator_unittest.cc',
    127         'i18n/char_iterator_unittest.cc',
    128         'i18n/file_util_icu_unittest.cc',
    129         'i18n/icu_string_conversions_unittest.cc',
    130         'i18n/rtl_unittest.cc',
    131         'json/json_reader_unittest.cc',
    132         'json/json_writer_unittest.cc',
    133         'json/string_escape_unittest.cc',
    134         'lazy_instance_unittest.cc',
    135         'linked_list_unittest.cc',
    136         'logging_unittest.cc',
    137         'mac/mac_util_unittest.mm',
    138         'memory/linked_ptr_unittest.cc',
    139         'memory/ref_counted_unittest.cc',
    140         'memory/scoped_native_library_unittest.cc',
    141         'memory/scoped_ptr_unittest.cc',
    142         'memory/scoped_temp_dir_unittest.cc',
    143         'memory/scoped_vector_unittest.cc',
    144         'memory/singleton_unittest.cc',
    145         'memory/weak_ptr_unittest.cc',
    146         'message_loop_proxy_impl_unittest.cc',
    147         'message_loop_unittest.cc',
    148         'message_pump_glib_unittest.cc',
    149         'metrics/field_trial_unittest.cc',
    150         'metrics/histogram_unittest.cc',
    151         'metrics/stats_table_unittest.cc',
    152         'observer_list_unittest.cc',
    153         'path_service_unittest.cc',
    154         'pickle_unittest.cc',
    155         'platform_file_unittest.cc',
    156         'pr_time_unittest.cc',
    157         'process_util_unittest.cc',
    158         'process_util_unittest_mac.h',
    159         'process_util_unittest_mac.mm',
    160         'rand_util_unittest.cc',
    161         'sha1_unittest.cc',
    162         'shared_memory_unittest.cc',
    163         'stack_container_unittest.cc',
    164         'string16_unittest.cc',
    165         'string_number_conversions_unittest.cc',
    166         'string_piece_unittest.cc',
    167         'string_split_unittest.cc',
    168         'string_tokenizer_unittest.cc',
    169         'string_util_unittest.cc',
    170         'stringize_macros_unittest.cc',
    171         'stringprintf_unittest.cc',
    172         'synchronization/cancellation_flag_unittest.cc',
    173         'synchronization/condition_variable_unittest.cc',
    174         'synchronization/lock_unittest.cc',
    175         'synchronization/waitable_event_unittest.cc',
    176         'synchronization/waitable_event_watcher_unittest.cc',
    177         'sys_info_unittest.cc',
    178         'sys_string_conversions_mac_unittest.mm',
    179         'sys_string_conversions_unittest.cc',
    180         'task_queue_unittest.cc',
    181         'task_unittest.cc',
    182         'template_util_unittest.cc',
    183         'threading/non_thread_safe_unittest.cc',
    184         'threading/platform_thread_unittest.cc',
    185         'threading/simple_thread_unittest.cc',
    186         'threading/thread_checker_unittest.cc',
    187         'threading/thread_collision_warner_unittest.cc',
    188         'threading/thread_local_storage_unittest.cc',
    189         'threading/thread_local_unittest.cc',
    190         'threading/thread_unittest.cc',
    191         'threading/watchdog_unittest.cc',
    192         'threading/worker_pool_posix_unittest.cc',
    193         'threading/worker_pool_unittest.cc',
    194         'time_unittest.cc',
    195         'time_win_unittest.cc',
    196         'timer_unittest.cc',
    197         'tools_sanity_unittest.cc',
    198         'tracked_objects_unittest.cc',
    199         'tuple_unittest.cc',
    200         'utf_offset_string_conversions_unittest.cc',
    201         'utf_string_conversions_unittest.cc',
    202         'values_unittest.cc',
    203         'version_unittest.cc',
    204         'vlog_unittest.cc',
    205         'win/event_trace_consumer_unittest.cc',
    206         'win/event_trace_controller_unittest.cc',
    207         'win/event_trace_provider_unittest.cc',
    208         'win/i18n_unittest.cc',
    209         'win/object_watcher_unittest.cc',
    210         'win/pe_image_unittest.cc',
    211         'win/registry_unittest.cc',
    212         'win/scoped_bstr_unittest.cc',
    213         'win/scoped_comptr_unittest.cc',
    214         'win/scoped_variant_unittest.cc',
    215         'win/win_util_unittest.cc',
    216         'win/wrapped_window_proc_unittest.cc',
    217       ],
    218       'dependencies': [
    219         'base',
    220         'base_i18n',
    221         'base_static',
    222         'test_support_base',
    223         '../testing/gmock.gyp:gmock',
    224         '../testing/gtest.gyp:gtest',
    225       ],
    226       'conditions': [
    227         ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
    228           'sources!': [
    229             'file_version_info_unittest.cc',
    230           ],
    231           'sources': [
    232             'nix/xdg_util_unittest.cc',
    233           ],
    234           'conditions': [
    235             [ 'linux_use_tcmalloc==1', {
    236                 'dependencies': [
    237                   'allocator/allocator.gyp:allocator',
    238                 ],
    239               },
    240             ],
    241           ],
    242           'dependencies': [
    243             '../build/linux/system.gyp:gtk',
    244             '../build/linux/system.gyp:nss',
    245             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
    246           ],
    247         }, {  # OS != "linux" and OS != "freebsd" and OS != "openbsd" and OS != "solaris"
    248           'sources!': [
    249             'message_pump_glib_unittest.cc',
    250           ]
    251         }],
    252         # This is needed to trigger the dll copy step on windows.
    253         # TODO(mark): This should not be necessary.
    254         ['OS == "win"', {
    255           'dependencies': [
    256             '../third_party/icu/icu.gyp:icudata',
    257           ],
    258           'sources!': [
    259             'dir_reader_posix_unittest.cc',
    260             'file_descriptor_shuffle_unittest.cc',
    261             'threading/worker_pool_posix_unittest.cc',
    262           ],
    263         }, {  # OS != "win"
    264           'sources/': [
    265             ['exclude', '^win/'],
    266           ],
    267           'sources!': [
    268             'system_monitor_unittest.cc',
    269             'time_win_unittest.cc',
    270             'trace_event_win_unittest.cc',
    271             'win_util_unittest.cc',
    272           ],
    273         }],
    274       ],
    275     },
    276     {
    277       'target_name': 'test_support_base',
    278       'type': '<(library)',
    279       'dependencies': [
    280         'base',
    281         'base_i18n',
    282         '../testing/gmock.gyp:gmock',
    283         '../testing/gtest.gyp:gtest',
    284       ],
    285       'conditions': [
    286         ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
    287           'dependencies': [
    288             # test_suite initializes GTK.
    289             '../build/linux/system.gyp:gtk',
    290           ],
    291         }],
    292       ],
    293       'sources': [
    294         'perftimer.cc',
    295         'test/mock_chrome_application_mac.h',
    296         'test/mock_chrome_application_mac.mm',
    297         'test/multiprocess_test.cc',
    298         'test/multiprocess_test.h',
    299         'test/perf_test_suite.cc',
    300         'test/perf_test_suite.h',
    301         'test/test_file_util.h',
    302         'test/test_file_util_linux.cc',
    303         'test/test_file_util_mac.cc',
    304         'test/test_file_util_posix.cc',
    305         'test/test_file_util_win.cc',
    306         'test/test_suite.cc',
    307         'test/test_suite.h',
    308         'test/test_switches.cc',
    309         'test/test_switches.h',
    310         'test/test_timeouts.cc',
    311         'test/test_timeouts.h',
    312       ],
    313     },
    314     {
    315       'target_name': 'test_support_perf',
    316       'type': '<(library)',
    317       'dependencies': [
    318         'base',
    319         '../testing/gtest.gyp:gtest',
    320       ],
    321       'sources': [
    322         'perftimer.cc',
    323         'test/run_all_perftests.cc',
    324       ],
    325       'direct_dependent_settings': {
    326         'defines': [
    327           'PERF_TEST',
    328         ],
    329       },
    330       'conditions': [
    331         ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
    332           'dependencies': [
    333             # Needed to handle the #include chain:
    334             #   base/test/perf_test_suite.h
    335             #   base/test/test_suite.h
    336             #   gtk/gtk.h
    337             '../build/linux/system.gyp:gtk',
    338           ],
    339         }],
    340       ],
    341     },
    342   ],
    343   'conditions': [
    344     [ 'OS == "win"', {
    345       'targets': [
    346         {
    347           'target_name': 'debug_message',
    348           'type': 'executable',
    349           'sources': [
    350             'debug_message.cc',
    351           ],
    352           'msvs_settings': {
    353             'VCLinkerTool': {
    354               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
    355             },
    356           },
    357         },
    358       ],
    359     }],
    360   ],
    361 }
    362 
    363 # Local Variables:
    364 # tab-width:2
    365 # indent-tabs-mode:nil
    366 # End:
    367 # vim: set expandtab tabstop=2 shiftwidth=2:
    368