blob: 91269004adae30c1262dcd2e5b5c2aa2fcf76f2a [file] [log] [blame]
[email protected]ef8c3cf2012-01-24 04:37:291# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# 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 },
[email protected]ef4fa4072009-12-04 22:46:509 'includes': [
[email protected]99ff9932011-09-07 14:14:5410 '../build/win_precompile.gypi',
[email protected]ef4fa4072009-12-04 22:46:5011 'base.gypi',
12 ],
[email protected]2f80c312009-02-25 21:26:5513 'targets': [
14 {
[email protected]d34d79f2009-10-14 22:06:1415 'target_name': 'base_i18n',
[email protected]c743d4c72011-08-31 22:15:4816 'type': '<(component)',
[email protected]1d88ef32011-12-20 19:59:1017 'variables': {
18 'enable_wexit_time_destructors': 1,
19 'optimize': 'max',
20 },
[email protected]2f80c312009-02-25 21:26:5521 'dependencies': [
22 'base',
[email protected]c743d4c72011-08-31 22:15:4823 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
[email protected]d34d79f2009-10-14 22:06:1424 '../third_party/icu/icu.gyp:icui18n',
25 '../third_party/icu/icu.gyp:icuuc',
[email protected]2f80c312009-02-25 21:26:5526 ],
[email protected]8f6f2022010-03-22 21:24:5727 'conditions': [
[email protected]79e2336c2011-05-12 18:18:3428 ['toolkit_uses_gtk==1', {
[email protected]8f6f2022010-03-22 21:24:5729 'dependencies': [
30 # i18n/rtl.cc uses gtk
31 '../build/linux/system.gyp:gtk',
32 ],
33 }],
34 ],
[email protected]2f80c312009-02-25 21:26:5535 'export_dependent_settings': [
36 'base',
37 ],
[email protected]c743d4c72011-08-31 22:15:4838 'defines': [
39 'BASE_I18N_IMPLEMENTATION',
40 ],
[email protected]d34d79f2009-10-14 22:06:1441 'sources': [
[email protected]c743d4c72011-08-31 22:15:4842 'i18n/base_i18n_export.h',
[email protected]14cd2e62011-02-24 09:20:1643 'i18n/bidi_line_iterator.cc',
44 'i18n/bidi_line_iterator.h',
[email protected]55954d892010-12-15 18:00:5445 'i18n/break_iterator.cc',
46 'i18n/break_iterator.h',
[email protected]0ca5c102010-08-23 14:30:2747 'i18n/char_iterator.cc',
48 'i18n/char_iterator.h',
[email protected]503d03872011-05-06 08:36:2649 'i18n/case_conversion.cc',
50 'i18n/case_conversion.h',
[email protected]d34d79f2009-10-14 22:06:1451 'i18n/file_util_icu.cc',
52 'i18n/file_util_icu.h',
[email protected]193c3512010-05-11 09:19:3053 'i18n/icu_encoding_detection.cc',
54 'i18n/icu_encoding_detection.h',
[email protected]d34d79f2009-10-14 22:06:1455 'i18n/icu_string_conversions.cc',
56 'i18n/icu_string_conversions.h',
57 'i18n/icu_util.cc',
58 'i18n/icu_util.h',
59 'i18n/number_formatting.cc',
60 'i18n/number_formatting.h',
[email protected]7cf1b6ce2010-03-20 06:37:0161 'i18n/rtl.cc',
62 'i18n/rtl.h',
[email protected]923402f32011-10-03 16:25:1963 'i18n/string_search.cc',
64 'i18n/string_search.h',
[email protected]d34d79f2009-10-14 22:06:1465 'i18n/time_formatting.cc',
66 'i18n/time_formatting.h',
[email protected]d34d79f2009-10-14 22:06:1467 ],
[email protected]2f80c312009-02-25 21:26:5568 },
69 {
[email protected]167d52b2011-04-04 22:42:4670 # This is the subset of files from base that should not be used with a
[email protected]23bb71f2011-04-21 22:22:1071 # dynamic library. Note that this library cannot depend on base because
72 # base depends on base_static.
[email protected]167d52b2011-04-04 22:42:4673 'target_name': 'base_static',
[email protected]5a547332011-05-19 23:18:5374 'type': 'static_library',
[email protected]1d88ef32011-12-20 19:59:1075 'variables': {
76 'enable_wexit_time_destructors': 1,
77 'optimize': 'max',
78 },
[email protected]e688d9c2011-09-15 21:17:3279 'toolsets': ['host', 'target'],
[email protected]167d52b2011-04-04 22:42:4680 'sources': [
[email protected]46fe10d62011-05-26 22:03:2881 'base_switches.cc',
82 'base_switches.h',
[email protected]167d52b2011-04-04 22:42:4683 'win/pe_image.cc',
84 'win/pe_image.h',
85 ],
86 'include_dirs': [
87 '..',
88 ],
89 },
90 {
91 # TODO(rvargas): Remove this when gyp finally supports a clean model.
92 # See bug 36232.
93 'target_name': 'base_static_win64',
[email protected]5a547332011-05-19 23:18:5394 'type': 'static_library',
[email protected]167d52b2011-04-04 22:42:4695 'sources': [
[email protected]46fe10d62011-05-26 22:03:2896 'base_switches.cc',
97 'base_switches.h',
[email protected]167d52b2011-04-04 22:42:4698 'win/pe_image.cc',
99 'win/pe_image.h',
100 ],
101 'include_dirs': [
102 '..',
103 ],
104 'configurations': {
105 'Common_Base': {
106 'msvs_target_platform': 'x64',
107 },
108 },
109 'defines': [
110 'NACL_WIN64',
111 ],
112 # TODO(rvargas): Bug 78117. Remove this.
113 'msvs_disabled_warnings': [
114 4244,
115 ],
116 },
[email protected]c5549062012-03-21 05:55:06117 # Include this target for a main() function that simply instantiates
118 # and runs a base::TestSuite.
119 {
120 'target_name': 'run_all_unittests',
121 'type': 'static_library',
122 'dependencies': [
123 'test_support_base',
124 ],
125 'sources': [
126 'test/run_all_unittests.cc',
127 ],
128 },
[email protected]6fa1e7ef2012-03-14 11:24:04129 {
[email protected]2f80c312009-02-25 21:26:55130 'target_name': 'base_unittests',
[email protected]d9f96952012-04-19 21:02:09131 'type': '<(gtest_target_type)',
[email protected]2f80c312009-02-25 21:26:55132 'sources': [
[email protected]c7f475ed2009-09-08 17:25:40133 # Tests.
[email protected]96e7ade2011-12-05 14:42:08134 'android/jni_android_unittest.cc',
[email protected]f98d7b92011-09-09 10:17:35135 'android/scoped_java_ref_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55136 'at_exit_unittest.cc',
137 'atomicops_unittest.cc',
[email protected]978df342009-11-24 06:21:53138 'base64_unittest.cc',
[email protected]c6944272012-01-06 22:12:28139 'bind_helpers_unittest.cc',
[email protected]b38d3572011-02-15 01:27:38140 'bind_unittest.cc',
[email protected]81814bce2011-09-10 03:03:00141 'bind_unittest.nc',
[email protected]6d1729e2009-11-18 23:08:39142 'bits_unittest.cc',
[email protected]08aa02762011-11-11 16:09:31143 'build_time_unittest.cc',
[email protected]2041cf342010-02-19 03:15:59144 'callback_unittest.cc',
[email protected]481915a772011-09-10 03:14:35145 'callback_unittest.nc',
[email protected]b77576f52011-11-24 04:12:04146 'cancelable_callback_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55147 'command_line_unittest.cc',
[email protected]14cd2e62011-02-24 09:20:16148 'cpu_unittest.cc',
[email protected]58580352010-10-26 04:07:50149 'debug/leak_tracker_unittest.cc',
150 'debug/stack_trace_unittest.cc',
[email protected]366ae242011-05-10 02:23:58151 'debug/trace_event_unittest.cc',
[email protected]58580352010-10-26 04:07:50152 'debug/trace_event_win_unittest.cc',
[email protected]ef73044e2010-03-11 15:25:54153 'dir_reader_posix_unittest.cc',
[email protected]76b90d312010-08-03 03:00:50154 'environment_unittest.cc',
[email protected]3f04f2b2009-04-30 19:40:03155 'file_descriptor_shuffle_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55156 'file_path_unittest.cc',
[email protected]77e07b842012-04-23 18:40:57157 'file_util_proxy_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55158 'file_util_unittest.cc',
159 'file_version_info_unittest.cc',
[email protected]d5bb49f2009-05-30 14:39:59160 'gmock_unittest.cc',
[email protected]925d5d602009-08-19 14:56:38161 'id_map_unittest.cc',
[email protected]55954d892010-12-15 18:00:54162 'i18n/break_iterator_unittest.cc',
[email protected]0ca5c102010-08-23 14:30:27163 'i18n/char_iterator_unittest.cc',
[email protected]503d03872011-05-06 08:36:26164 'i18n/case_conversion_unittest.cc',
[email protected]d0767cb542009-10-08 17:38:30165 'i18n/file_util_icu_unittest.cc',
[email protected]d6e58c6e2009-10-10 20:40:50166 'i18n/icu_string_conversions_unittest.cc',
[email protected]7a3b2632011-06-22 20:40:22167 'i18n/number_formatting_unittest.cc',
[email protected]7cf1b6ce2010-03-20 06:37:01168 'i18n/rtl_unittest.cc',
[email protected]258dca42011-09-21 00:17:19169 'i18n/string_search_unittest.cc',
[email protected]60e6c842011-05-30 11:45:43170 'i18n/time_formatting_unittest.cc',
[email protected]93d49d72009-10-23 20:00:20171 'json/json_reader_unittest.cc',
[email protected]193f946b2011-12-22 18:31:47172 'json/json_value_converter_unittest.cc',
[email protected]8d77b632011-11-17 16:17:23173 'json/json_value_serializer_unittest.cc',
[email protected]93d49d72009-10-23 20:00:20174 'json/json_writer_unittest.cc',
175 'json/string_escape_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55176 'lazy_instance_unittest.cc',
[email protected]48ca9012009-08-11 21:38:54177 'linked_list_unittest.cc',
[email protected]521b0c42010-10-01 23:02:36178 'logging_unittest.cc',
[email protected]06ff3c52012-03-01 01:58:05179 'mac/closure_blocks_leopard_compat_unittest.cc',
[email protected]28f56492011-10-19 00:36:56180 'mac/foundation_util_unittest.mm',
[email protected]0378bf42011-01-01 18:20:14181 'mac/mac_util_unittest.mm',
[email protected]10756c52011-04-20 22:30:35182 'mac/objc_property_releaser_unittest.mm',
[email protected]d47af2172011-12-01 23:56:17183 'mac/scoped_sending_event_unittest.mm',
[email protected]47f19be2011-04-25 23:54:07184 'md5_unittest.cc',
[email protected]cd924d62012-02-23 17:52:20185 'memory/aligned_memory_unittest.cc',
[email protected]3b63f8f42011-03-28 01:54:15186 'memory/linked_ptr_unittest.cc',
[email protected]b4ae4442011-04-27 18:37:03187 'memory/mru_cache_unittest.cc',
[email protected]1dda9772011-07-22 13:22:23188 'memory/ref_counted_memory_unittest.cc',
[email protected]3b63f8f42011-03-28 01:54:15189 'memory/ref_counted_unittest.cc',
[email protected]656d2ab12012-02-09 09:50:58190 'memory/scoped_nsobject_unittest.mm',
[email protected]3b63f8f42011-03-28 01:54:15191 'memory/scoped_ptr_unittest.cc',
[email protected]6e29d6f32012-01-25 00:33:05192 'memory/scoped_ptr_unittest.nc',
[email protected]e5721c182011-03-28 22:27:34193 'memory/scoped_vector_unittest.cc',
[email protected]3b63f8f42011-03-28 01:54:15194 'memory/singleton_unittest.cc',
195 'memory/weak_ptr_unittest.cc',
[email protected]656475d2010-05-06 18:34:24196 'message_loop_proxy_impl_unittest.cc',
[email protected]c31af70db22011-08-18 23:13:01197 'message_loop_proxy_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55198 'message_loop_unittest.cc',
[email protected]b44d5cc2009-06-15 10:30:44199 'message_pump_glib_unittest.cc',
[email protected]b4339c3a2011-05-13 16:19:23200 'message_pump_libevent_unittest.cc',
[email protected]835d7c82010-10-14 04:38:38201 'metrics/field_trial_unittest.cc',
202 'metrics/histogram_unittest.cc',
203 'metrics/stats_table_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55204 'observer_list_unittest.cc',
205 'path_service_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55206 'pickle_unittest.cc',
[email protected]3fb43ed12010-09-10 03:01:14207 'platform_file_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55208 'pr_time_unittest.cc',
209 'process_util_unittest.cc',
[email protected]9f958442010-03-19 18:42:41210 'process_util_unittest_mac.h',
211 'process_util_unittest_mac.mm',
[email protected]dbe5d2072011-11-08 17:09:21212 'profiler/tracked_time_unittest.cc',
[email protected]45644f62011-11-23 00:58:23213 'property_bag_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55214 'rand_util_unittest.cc',
[email protected]e0785902011-05-19 23:34:17215 'scoped_native_library_unittest.cc',
216 'scoped_temp_dir_unittest.cc',
[email protected]c2ad1e32009-11-04 19:29:58217 'sha1_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55218 'shared_memory_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55219 'stack_container_unittest.cc',
[email protected]3c1304e22010-11-13 20:05:47220 'string16_unittest.cc',
[email protected]528c56d2010-07-30 19:28:44221 'string_number_conversions_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55222 'string_piece_unittest.cc',
[email protected]0477554f2010-01-21 19:29:25223 'string_split_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55224 'string_tokenizer_unittest.cc',
225 'string_util_unittest.cc',
[email protected]176ab802010-11-18 02:15:12226 'stringize_macros_unittest.cc',
[email protected]e6811ed52010-08-17 03:45:37227 'stringprintf_unittest.cc',
[email protected]44f9c952011-01-02 06:05:39228 'synchronization/cancellation_flag_unittest.cc',
[email protected]bc581a682011-01-01 23:16:20229 'synchronization/condition_variable_unittest.cc',
230 'synchronization/lock_unittest.cc',
[email protected]44f9c952011-01-02 06:05:39231 'synchronization/waitable_event_unittest.cc',
232 'synchronization/waitable_event_watcher_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55233 'sys_info_unittest.cc',
[email protected]a2494cb2009-11-08 19:04:54234 'sys_string_conversions_mac_unittest.mm',
[email protected]2f80c312009-02-25 21:26:55235 'sys_string_conversions_unittest.cc',
[email protected]e41d7dd2011-05-18 07:29:56236 'system_monitor/system_monitor_unittest.cc',
[email protected]95991b12012-04-17 02:48:06237 'task_runner_util_unittest.cc',
[email protected]b38d3572011-02-15 01:27:38238 'template_util_unittest.cc',
[email protected]ce5d0472012-04-02 10:16:55239 'test/sequenced_worker_pool_owner.cc',
240 'test/sequenced_worker_pool_owner.h',
[email protected]7a79dafb2011-10-29 03:16:52241 'test/trace_event_analyzer_unittest.cc',
[email protected]c9177502011-01-01 04:48:49242 'threading/non_thread_safe_unittest.cc',
[email protected]ce072a72010-12-31 20:02:16243 'threading/platform_thread_unittest.cc',
[email protected]098def22012-01-01 05:42:34244 'threading/sequenced_worker_pool_unittest.cc',
[email protected]ac9ba8fe2010-12-30 18:08:36245 'threading/simple_thread_unittest.cc',
[email protected]ce072a72010-12-31 20:02:16246 'threading/thread_checker_unittest.cc',
[email protected]34b99632011-01-01 01:01:06247 'threading/thread_collision_warner_unittest.cc',
[email protected]1357c322010-12-30 22:18:56248 'threading/thread_local_storage_unittest.cc',
249 'threading/thread_local_unittest.cc',
[email protected]34b99632011-01-01 01:01:06250 'threading/thread_unittest.cc',
[email protected]ac9ba8fe2010-12-30 18:08:36251 'threading/watchdog_unittest.cc',
252 'threading/worker_pool_posix_unittest.cc',
253 'threading/worker_pool_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55254 'time_unittest.cc',
255 'time_win_unittest.cc',
256 'timer_unittest.cc',
[email protected]0716cba2009-12-17 12:37:58257 'tools_sanity_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55258 'tracked_objects_unittest.cc',
259 'tuple_unittest.cc',
[email protected]b9f93832009-11-13 19:27:48260 'utf_offset_string_conversions_unittest.cc',
[email protected]ce85f602009-11-07 01:34:53261 'utf_string_conversions_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55262 'values_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31263 'version_unittest.cc',
[email protected]99b7c57f2010-09-29 19:26:36264 'vlog_unittest.cc',
[email protected]f21ed6f2011-12-22 22:07:41265 'win/dllmain.cc',
[email protected]c43b0dc2011-12-03 04:31:13266 'win/enum_variant_unittest.cc',
[email protected]ba50d1922010-11-06 15:39:40267 'win/event_trace_consumer_unittest.cc',
268 'win/event_trace_controller_unittest.cc',
269 'win/event_trace_provider_unittest.cc',
[email protected]337ca072010-11-16 15:28:45270 'win/i18n_unittest.cc',
[email protected]c43b0dc2011-12-03 04:31:13271 'win/iunknown_impl_unittest.cc',
[email protected]a8d1ebbe2011-01-01 18:26:16272 'win/object_watcher_unittest.cc',
[email protected]2d6503982010-10-17 04:41:54273 'win/pe_image_unittest.cc',
274 'win/registry_unittest.cc',
[email protected]da00f002011-12-07 21:44:28275 'win/sampling_profiler_unittest.cc',
[email protected]ce0e72462010-10-16 03:46:05276 'win/scoped_bstr_unittest.cc',
277 'win/scoped_comptr_unittest.cc',
[email protected]e8f5ff52012-04-04 19:57:50278 'win/scoped_process_information_unittest.cc',
[email protected]ce0e72462010-10-16 03:46:05279 'win/scoped_variant_unittest.cc',
[email protected]a8e20582010-12-31 17:18:50280 'win/win_util_unittest.cc',
[email protected]ecb924c2011-03-17 00:34:09281 'win/wrapped_window_proc_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55282 ],
[email protected]2f80c312009-02-25 21:26:55283 'dependencies': [
284 'base',
[email protected]d34d79f2009-10-14 22:06:14285 'base_i18n',
[email protected]167d52b2011-04-04 22:42:46286 'base_static',
[email protected]c5549062012-03-21 05:55:06287 'run_all_unittests',
[email protected]6fa18d12010-08-16 04:18:41288 'test_support_base',
[email protected]23bb71f2011-04-21 22:22:10289 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
[email protected]ce3157102009-05-28 07:23:16290 '../testing/gmock.gyp:gmock',
[email protected]2f80c312009-02-25 21:26:55291 '../testing/gtest.gyp:gtest',
[email protected]60e6c842011-05-30 11:45:43292 '../third_party/icu/icu.gyp:icui18n',
293 '../third_party/icu/icu.gyp:icuuc',
[email protected]2f80c312009-02-25 21:26:55294 ],
[email protected]81814bce2011-09-10 03:03:00295 'includes': ['../build/nocompile.gypi'],
296 'variables': {
297 # TODO(ajwong): Is there a way to autodetect this?
298 'module_dir': 'base'
299 },
[email protected]2f80c312009-02-25 21:26:55300 'conditions': [
[email protected]923402f32011-10-03 16:25:19301 ['OS == "android"', {
[email protected]923402f32011-10-03 16:25:19302 'sources!': [
[email protected]923402f32011-10-03 16:25:19303 # TODO(michaelbai): Removed the below once the fix upstreamed.
304 'memory/mru_cache_unittest.cc',
305 'process_util_unittest.cc',
306 'synchronization/cancellation_flag_unittest.cc',
307 # TODO(michaelbai): The below files are excluded because of the
308 # missing JNI and should be added back once JNI is ready.
[email protected]b5c911a02011-12-06 23:28:21309 'android/jni_android_unittest.cc',
[email protected]923402f32011-10-03 16:25:19310 'android/scoped_java_ref_unittest.cc',
311 'debug/stack_trace_unittest.cc',
312 ],
[email protected]cef04bcf2012-02-24 00:09:38313 'dependencies': [
[email protected]fae37d62012-03-08 12:39:13314 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
[email protected]cef04bcf2012-02-24 00:09:38315 ],
[email protected]923402f32011-10-03 16:25:19316 }],
[email protected]d9f96952012-04-19 21:02:09317 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
318 'dependencies': [
319 '../testing/android/native_test.gyp:native_test_native_code',
320 ],
321 }],
[email protected]258dca42011-09-21 00:17:19322 ['use_glib==1', {
[email protected]8b03e8d2009-03-02 06:53:31323 'sources!': [
324 'file_version_info_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31325 ],
[email protected]63dc3782010-10-19 19:09:30326 'conditions': [
327 [ 'linux_use_tcmalloc==1', {
328 'dependencies': [
329 'allocator/allocator.gyp:allocator',
330 ],
331 },
332 ],
[email protected]258dca42011-09-21 00:17:19333 [ 'toolkit_uses_gtk==1', {
334 'sources': [
335 'nix/xdg_util_unittest.cc',
336 ],
337 'dependencies': [
338 '../build/linux/system.gyp:gtk',
339 ]
340 }],
[email protected]63dc3782010-10-19 19:09:30341 ],
[email protected]9d384032009-03-20 23:13:26342 'dependencies': [
[email protected]258dca42011-09-21 00:17:19343 '../build/linux/system.gyp:glib',
[email protected]638e9df42011-05-31 17:19:30344 '../build/linux/system.gyp:ssl',
[email protected]a97488f2009-09-17 21:37:19345 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
[email protected]9d384032009-03-20 23:13:26346 ],
[email protected]258dca42011-09-21 00:17:19347 }, { # use_glib!=1
[email protected]b44d5cc2009-06-15 10:30:44348 'sources!': [
349 'message_pump_glib_unittest.cc',
350 ]
[email protected]8b03e8d2009-03-02 06:53:31351 }],
[email protected]2f80c312009-02-25 21:26:55352 # This is needed to trigger the dll copy step on windows.
353 # TODO(mark): This should not be necessary.
[email protected]8b03e8d2009-03-02 06:53:31354 ['OS == "win"', {
355 'dependencies': [
[email protected]280629492009-09-09 06:49:08356 '../third_party/icu/icu.gyp:icudata',
[email protected]8b03e8d2009-03-02 06:53:31357 ],
358 'sources!': [
[email protected]ef73044e2010-03-11 15:25:54359 'dir_reader_posix_unittest.cc',
[email protected]3f04f2b2009-04-30 19:40:03360 'file_descriptor_shuffle_unittest.cc',
[email protected]541c4db2010-12-30 18:29:28361 'threading/worker_pool_posix_unittest.cc',
[email protected]b4339c3a2011-05-13 16:19:23362 'message_pump_libevent_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31363 ],
364 }, { # OS != "win"
[email protected]92508df2011-08-04 22:23:55365 'dependencies': [
366 '../third_party/libevent/libevent.gyp:libevent'
367 ],
[email protected]ce0e72462010-10-16 03:46:05368 'sources/': [
369 ['exclude', '^win/'],
370 ],
[email protected]8b03e8d2009-03-02 06:53:31371 'sources!': [
[email protected]3381f172011-05-25 00:20:42372 'debug/trace_event_win_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31373 'time_win_unittest.cc',
[email protected]3381f172011-05-25 00:20:42374 'win/win_util_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31375 ],
376 }],
[email protected]06ff3c52012-03-01 01:58:05377 ['OS=="mac"', {
378 'dependencies': [
379 'closure_blocks_leopard_compat',
380 ],
381 }],
[email protected]2f80c312009-02-25 21:26:55382 ],
383 },
[email protected]e8ef09a2009-03-16 23:46:45384 {
[email protected]ddb9b332011-12-02 07:31:09385 'target_name': 'check_example',
386 'type': 'executable',
387 'sources': [
388 'check_example.cc',
389 ],
390 'dependencies': [
391 'base',
392 ],
393 },
394 {
[email protected]e8ef09a2009-03-16 23:46:45395 'target_name': 'test_support_base',
[email protected]5a547332011-05-19 23:18:53396 'type': 'static_library',
[email protected]e8ef09a2009-03-16 23:46:45397 'dependencies': [
398 'base',
[email protected]23bb71f2011-04-21 22:22:10399 'base_static',
[email protected]afa8020c2010-08-16 04:42:26400 'base_i18n',
[email protected]6fa18d12010-08-16 04:18:41401 '../testing/gmock.gyp:gmock',
402 '../testing/gtest.gyp:gtest',
[email protected]7d1ba9392009-08-03 18:35:06403 ],
[email protected]23bb71f2011-04-21 22:22:10404 'export_dependent_settings': [
405 'base',
406 ],
[email protected]afa8020c2010-08-16 04:42:26407 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34408 ['toolkit_uses_gtk==1', {
[email protected]afa8020c2010-08-16 04:42:26409 'dependencies': [
410 # test_suite initializes GTK.
411 '../build/linux/system.gyp:gtk',
412 ],
413 }],
[email protected]3ae445e82011-06-20 17:44:05414 ['os_posix==0', {
415 'sources!': [
416 'test/scoped_locale.cc',
417 'test/scoped_locale.h',
418 ],
419 }],
[email protected]c48aef92011-11-22 23:41:45420 ['os_bsd==1', {
[email protected]167ec822011-10-24 22:05:27421 'sources!': [
422 'test/test_file_util_linux.cc',
423 ],
424 }],
[email protected]afa8020c2010-08-16 04:42:26425 ],
[email protected]7d1ba9392009-08-03 18:35:06426 'sources': [
[email protected]bc052ef52010-10-10 02:42:32427 'perftimer.cc',
[email protected]a3668802010-12-18 01:18:29428 'test/mock_chrome_application_mac.h',
429 'test/mock_chrome_application_mac.mm',
[email protected]df6c4192012-03-02 23:13:40430 'test/mock_devices_changed_observer.cc',
431 'test/mock_devices_changed_observer.h',
[email protected]c4996f762011-06-28 14:29:06432 'test/mock_time_provider.cc',
433 'test/mock_time_provider.h',
[email protected]20e14912010-08-17 19:40:11434 'test/multiprocess_test.cc',
435 'test/multiprocess_test.h',
[email protected]99cc51e2010-10-10 00:21:35436 'test/perf_test_suite.cc',
[email protected]20e14912010-08-17 19:40:11437 'test/perf_test_suite.h',
[email protected]3ae445e82011-06-20 17:44:05438 'test/scoped_locale.cc',
439 'test/scoped_locale.h',
[email protected]ce5d0472012-04-02 10:16:55440 'test/sequenced_task_runner_test_template.cc',
441 'test/sequenced_task_runner_test_template.h',
[email protected]c8cae7c2012-03-09 06:20:18442 'test/task_runner_test_template.cc',
443 'test/task_runner_test_template.h',
[email protected]fb895c62009-10-09 18:20:30444 'test/test_file_util.h',
445 'test/test_file_util_linux.cc',
446 'test/test_file_util_mac.cc',
447 'test/test_file_util_posix.cc',
448 'test/test_file_util_win.cc',
[email protected]a8f85882011-08-24 20:02:42449 'test/test_reg_util_win.cc',
450 'test/test_reg_util_win.h',
[email protected]6fa18d12010-08-16 04:18:41451 'test/test_suite.cc',
452 'test/test_suite.h',
[email protected]923402f32011-10-03 16:25:19453 'test/test_stub_android.cc',
[email protected]cbb9f50f2010-10-05 19:03:05454 'test/test_switches.cc',
455 'test/test_switches.h',
456 'test/test_timeouts.cc',
457 'test/test_timeouts.h',
[email protected]8aaae7b2011-06-28 06:43:20458 'test/thread_test_helper.cc',
459 'test/thread_test_helper.h',
[email protected]7a79dafb2011-10-29 03:16:52460 'test/trace_event_analyzer.cc',
461 'test/trace_event_analyzer.h',
[email protected]6085ccd2012-02-29 03:57:29462 'test/values_test_util.cc',
463 'test/values_test_util.h',
[email protected]7d1ba9392009-08-03 18:35:06464 ],
[email protected]7d1ba9392009-08-03 18:35:06465 },
466 {
[email protected]01971642012-03-07 14:39:56467 'target_name': 'base_unittests_run',
468 'type': 'none',
469 'dependencies': [
470 'base_unittests',
471 ],
[email protected]256f4bd2012-04-12 01:59:29472 'includes': [
473 'base_unittests.isolate',
474 ],
[email protected]01971642012-03-07 14:39:56475 'actions': [
476 {
[email protected]0a88a652012-03-09 00:34:45477 'action_name': 'isolate',
478 'inputs': [
[email protected]256f4bd2012-04-12 01:59:29479 'base_unittests.isolate',
480 '<@(isolate_dependency_tracked)',
[email protected]0a88a652012-03-09 00:34:45481 ],
482 'outputs': [
[email protected]01971642012-03-07 14:39:56483 '<(PRODUCT_DIR)/base_unittests.results',
484 ],
485 'action': [
486 'python',
[email protected]256f4bd2012-04-12 01:59:29487 '../tools/isolate/isolate.py',
488 '--mode', '<(tests_run)',
[email protected]5b7903542012-04-23 03:05:36489 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR)',
490 '--variable', 'OS', '<(OS)',
[email protected]01971642012-03-07 14:39:56491 '--result', '<@(_outputs)',
[email protected]256f4bd2012-04-12 01:59:29492 'base_unittests.isolate',
[email protected]01971642012-03-07 14:39:56493 ],
494 },
495 ],
496 },
497 {
[email protected]7d1ba9392009-08-03 18:35:06498 'target_name': 'test_support_perf',
[email protected]5a547332011-05-19 23:18:53499 'type': 'static_library',
[email protected]7d1ba9392009-08-03 18:35:06500 'dependencies': [
501 'base',
[email protected]e8ef09a2009-03-16 23:46:45502 '../testing/gtest.gyp:gtest',
503 ],
504 'sources': [
505 'perftimer.cc',
[email protected]fb895c62009-10-09 18:20:30506 'test/run_all_perftests.cc',
[email protected]e8ef09a2009-03-16 23:46:45507 ],
508 'direct_dependent_settings': {
509 'defines': [
510 'PERF_TEST',
511 ],
512 },
[email protected]9d384032009-03-20 23:13:26513 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34514 ['toolkit_uses_gtk==1', {
[email protected]9d384032009-03-20 23:13:26515 'dependencies': [
516 # Needed to handle the #include chain:
[email protected]fb895c62009-10-09 18:20:30517 # base/test/perf_test_suite.h
518 # base/test/test_suite.h
[email protected]9d384032009-03-20 23:13:26519 # gtk/gtk.h
520 '../build/linux/system.gyp:gtk',
521 ],
522 }],
523 ],
[email protected]e8ef09a2009-03-16 23:46:45524 },
[email protected]2f80c312009-02-25 21:26:55525 ],
526 'conditions': [
[email protected]65208a02012-04-17 04:39:52527 ['OS == "android"', {
528 'targets': [
529 {
530 'target_name': 'base_jni_headers',
531 'type': 'none',
532 'variables': {
533 'java_sources': [
534 'android/java/org/chromium/base/BuildInfo.java',
535 'android/java/org/chromium/base/PathUtils.java',
536 'android/java/org/chromium/base/SystemMessageHandler.java',
537 ],
538 'jni_headers': [
539 '<(SHARED_INTERMEDIATE_DIR)/base/jni/build_info_jni.h',
540 '<(SHARED_INTERMEDIATE_DIR)/base/jni/path_utils_jni.h',
541 '<(SHARED_INTERMEDIATE_DIR)/base/jni/system_message_handler_jni.h',
542 ],
543 },
544 'includes': [ '../build/jni_generator.gypi' ],
545 },
546 {
547 'target_name': 'base_java',
548 'type': 'none',
549 'variables': {
550 'package_name': 'base',
551 'java_in_dir': 'android/java',
552 },
553 'includes': [ '../build/java.gypi' ],
554 },
555 ],
556 }],
[email protected]06ff3c52012-03-01 01:58:05557 ['OS == "win"', {
[email protected]2f80c312009-02-25 21:26:55558 'targets': [
559 {
560 'target_name': 'debug_message',
561 'type': 'executable',
562 'sources': [
563 'debug_message.cc',
564 ],
[email protected]3f8bfc362009-05-22 02:39:14565 'msvs_settings': {
566 'VCLinkerTool': {
567 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
568 },
569 },
[email protected]2f80c312009-02-25 21:26:55570 },
571 ],
572 }],
[email protected]06ff3c52012-03-01 01:58:05573 ['OS=="mac"', {
574 'targets': [
575 {
576 'target_name': 'closure_blocks_leopard_compat',
577 'sources': [
578 'mac/closure_blocks_leopard_compat.h',
579 ],
580 'conditions': [
581 ['mac_sdk == "10.5"', {
582 'type': 'shared_library',
583 'product_name': 'closure_blocks_leopard_compat_stub',
584 'variables': {
585 # This target controls stripping directly. See below.
586 'mac_strip': 0,
587 },
588 'sources': [
589 'mac/closure_blocks_leopard_compat.S',
590 ],
591 'xcode_settings': {
592 # These values are taken from libSystem.dylib in the 10.5
593 # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
594 # against this stub library to look for the symbols it
595 # provides in the real libSystem at runtime. When using ld
596 # from Xcode 4 or later (ld64-123.2 and up), giving two
597 # libraries with the same "install name" to the linker will
598 # cause it to print "ld: warning: dylibs with same install
599 # name". This is harmless, and ld will behave as intended
600 # here.
601 #
602 # The real library's compatibility version is used, and the
603 # value of the current version from the SDK is used to make
604 # it appear as though anything linked against this stub was
605 # linked against the real thing.
606 'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
607 'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
608 'DYLIB_CURRENT_VERSION': '111.1.4',
609
610 # Turn on stripping (yes, even in debug mode), and add the -c
611 # flag. This is what produces a stub library (MH_DYLIB_STUB)
612 # as opposed to a dylib (MH_DYLIB). MH_DYLIB_STUB files
613 # contain symbol tables and everything else needed for
614 # linking, but are stripped of section contents. This is the
615 # same way that the stub libraries in Mac OS X SDKs are
616 # created. dyld will refuse to load a stub library, so this
617 # provides some insurance in case anyone tries to load the
618 # stub at runtime.
619 'DEPLOYMENT_POSTPROCESSING': 'YES',
620 'STRIP_STYLE': 'non-global',
621 'STRIPFLAGS': '-c',
622 },
623 }, { # else: mac_sdk != "10.5"
624 # When using the 10.6 SDK or newer, the necessary definitions
625 # are already present in libSystem.dylib. There is no need to
626 # build a stub dylib to provide these symbols at link time.
627 # This target is still useful to cause those symbols to be
628 # treated as weak imports in dependents, who still must
629 # #include closure_blocks_leopard_compat.h to get weak imports.
630 'type': 'none',
631 }],
632 ],
633 },
634 ],
635 }],
[email protected]d9f96952012-04-19 21:02:09636 # Special target to wrap a <(gtest_target_type)==shared_library
637 # base_unittests into an android apk for execution.
638 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
639 # in the gyp make generator. What is the correct way to extract
640 # this path from gyp and into 'raw' for input to antfiles?
641 # Hard-coding in the gypfile seems a poor choice.
642 # TODO(jrg): there has to be a shorter way to do all this. Try
643 # and convert this entire target cluster into ~5 lines that can be
644 # trivially copied to other projects with only a deps change, such
645 # as with a new gtest_target_type called
646 # 'shared_library_apk_wrapper' that does a lot of this magically.
647 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
648 'targets': [
649 {
650 'target_name': 'base_unittests_apk',
651 'type': 'none',
652 'dependencies': [
653 'base', # So that android/java/java.gyp:base_java is built
654 'base_unittests',
655 ],
656 'actions': [
657 {
658 # Generate apk files (including source and antfile) from
659 # a template, and builds them.
660 'action_name': 'generate_and_build',
661 'inputs': [
662 '../testing/android/generate_native_test.py',
663 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
664 '<(PRODUCT_DIR)/chromium_base.jar'
665 ],
666 'outputs': [
667 '<(PRODUCT_DIR)/ChromeNativeTests_base_unittests-debug.apk',
668 ],
669 'action': [
670 '../testing/android/generate_native_test.py',
671 '--native_library',
672 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
673 '--jar',
674 '<(PRODUCT_DIR)/chromium_base.jar',
675 '--output',
676 '<(PRODUCT_DIR)/base_unittests_apk',
677 '--ant-args',
678 '-DPRODUCT_DIR=<(PRODUCT_DIR)',
679 '--ant-compile'
680 ],
681 },
682 ]
683 }],
684 }],
[email protected]2f80c312009-02-25 21:26:55685 ],
686}