blob: 8a73064bc07f8bf920749717d173dae789541d49 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001# Copyright (c) 2012 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 '../build/win_precompile.gypi',
11 'base.gypi',
12 ],
13 'targets': [
14 {
15 'target_name': 'base',
16 'type': '<(component)',
17 'toolsets': ['host', 'target'],
18 'variables': {
19 'base_target': 1,
20 'enable_wexit_time_destructors': 1,
21 'optimize': 'max',
22 },
23 'dependencies': [
24 'base_static',
25 'allocator/allocator.gyp:allocator_extension_thunks',
26 '../testing/gtest.gyp:gtest_prod',
27 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
28 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
29 ],
30 # TODO(gregoryd): direct_dependent_settings should be shared with the
31 # 64-bit target, but it doesn't work due to a bug in gyp
32 'direct_dependent_settings': {
33 'include_dirs': [
34 '..',
35 ],
36 },
37 'conditions': [
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000038 ['desktop_linux == 1 or chromeos == 1', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +000039 'conditions': [
40 ['chromeos==1', {
41 'sources/': [ ['include', '_chromeos\\.cc$'] ]
42 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +000043 ['toolkit_uses_gtk==1', {
44 'dependencies': [
45 '../build/linux/system.gyp:gtk',
46 ],
47 'export_dependent_settings': [
48 '../build/linux/system.gyp:gtk',
49 ],
50 }],
51 ],
52 'dependencies': [
53 'symbolize',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000054 'xdg_mime',
55 ],
56 'defines': [
57 'USE_SYMBOLIZE',
58 ],
59 'cflags': [
60 '-Wno-write-strings',
61 ],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000062 }, { # desktop_linux == 0 and chromeos == 0
Torne (Richard Coles)58218062012-11-14 11:43:16 +000063 'sources/': [
64 ['exclude', '/xdg_user_dirs/'],
65 ['exclude', '_nss\\.cc$'],
66 ],
67 }],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000068 ['use_glib==1', {
69 'dependencies': [
70 '../build/linux/system.gyp:glib',
71 ],
72 'export_dependent_settings': [
73 '../build/linux/system.gyp:glib',
74 ],
75 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000076 ['use_x11==1', {
77 'dependencies': [
78 '../build/linux/system.gyp:x11',
79 ],
80 'export_dependent_settings': [
81 '../build/linux/system.gyp:x11',
82 ],
83 }],
Torne (Richard Coles)68043e12013-09-26 13:24:57 +010084 ['use_aura==1 and use_x11==1', {
85 'dependencies': [
86 '../build/linux/system.gyp:xrandr',
87 ],
88 'export_dependent_settings': [
89 '../build/linux/system.gyp:xrandr',
90 ],
91 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +000092 ['OS == "android" and _toolset == "host"', {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000093 # Always build base as a static_library for host toolset, even if
94 # we're doing a component build. Specifically, we only care about the
95 # target toolset using components since that's what developers are
96 # focusing on. In theory we should do this more generally for all
97 # targets when building for host, but getting the gyp magic
98 # per-toolset for the "component" variable is hard, and we really only
99 # need base on host.
100 'type': 'static_library',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000101 # Base for host support is the minimum required to run the
102 # ssl false start blacklist tool. It requires further changes
103 # to generically support host builds (and tests).
104 # Note: when building for host, gyp has OS == "android",
105 # hence the *_android.cc files are included but the actual code
106 # doesn't have OS_ANDROID / ANDROID defined.
107 'conditions': [
108 # Host build on linux depends on system.gyp::gtk as
109 # default linux build has TOOLKIT_GTK defined.
110 ['host_os == "linux"', {
111 'sources/': [
112 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
113 ],
114 'dependencies': [
115 '../build/linux/system.gyp:gtk',
116 ],
117 'export_dependent_settings': [
118 '../build/linux/system.gyp:gtk',
119 ],
120 }],
121 ['host_os == "mac"', {
122 'sources/': [
123 ['exclude', '^native_library_linux\\.cc$'],
124 ['exclude', '^process_util_linux\\.cc$'],
125 ['exclude', '^sys_info_linux\\.cc$'],
126 ['exclude', '^sys_string_conversions_linux\\.cc$'],
127 ['exclude', '^worker_pool_linux\\.cc$'],
128 ],
129 }],
130 ],
131 }],
132 ['OS == "android" and _toolset == "target"', {
133 'conditions': [
134 ['target_arch == "ia32"', {
135 'sources/': [
136 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
137 ],
138 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100139 ['target_arch == "mipsel"', {
140 'sources/': [
141 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
142 ],
143 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000144 ],
145 'dependencies': [
146 'base_jni_headers',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000147 '../third_party/ashmem/ashmem.gyp:ashmem',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000148 ],
149 'include_dirs': [
150 '<(SHARED_INTERMEDIATE_DIR)/base',
151 ],
152 'link_settings': {
153 'libraries': [
154 '-llog',
155 ],
156 },
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000157 'sources!': [
158 'debug/stack_trace_posix.cc',
159 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000160 'includes': [
161 '../build/android/cpufeatures.gypi',
162 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000163 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000164 ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000165 'dependencies': [
166 'base_java',
167 ],
168 }],
169 ['os_bsd==1', {
170 'include_dirs': [
171 '/usr/local/include',
172 ],
173 'link_settings': {
174 'libraries': [
175 '-L/usr/local/lib -lexecinfo',
176 ],
177 },
178 }],
179 ['OS == "linux"', {
180 'link_settings': {
181 'libraries': [
182 # We need rt for clock_gettime().
183 '-lrt',
184 # For 'native_library_linux.cc'
185 '-ldl',
186 ],
187 },
Ben Murdocheb525c52013-07-10 11:40:50 +0100188 'conditions': [
189 ['linux_use_tcmalloc==0', {
190 'defines': [
191 'NO_TCMALLOC',
192 ],
193 'direct_dependent_settings': {
194 'defines': [
195 'NO_TCMALLOC',
196 ],
197 },
198 }],
199 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000200 }],
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100201 ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000202 'link_settings': {
203 'libraries': [
204 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
205 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
206 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
207 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
208 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
209 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
210 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
211 ],
212 },
213 'dependencies': [
214 '../third_party/mach_override/mach_override.gyp:mach_override',
215 ],
216 }],
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100217 ['OS == "ios" and _toolset != "host"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000218 'link_settings': {
219 'libraries': [
220 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
221 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
222 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
223 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
224 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
225 ],
226 },
227 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000228 ['OS != "win" and OS != "ios"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000229 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
230 },],
231 ['component=="shared_library"', {
232 'conditions': [
233 ['OS=="win"', {
234 'sources!': [
235 'debug/debug_on_start_win.cc',
236 ],
237 }],
238 ],
239 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000240 ['use_system_nspr==1', {
241 'dependencies': [
242 'third_party/nspr/nspr.gyp:nspr',
243 ],
244 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000245 ],
246 'sources': [
247 'third_party/nspr/prcpucfg.h',
248 'third_party/nspr/prcpucfg_win.h',
249 'third_party/nspr/prtypes.h',
250 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
251 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100252 'async_socket_io_handler.h',
253 'async_socket_io_handler_posix.cc',
254 'async_socket_io_handler_win.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000255 'auto_reset.h',
256 'event_recorder.h',
257 'event_recorder_stubs.cc',
258 'event_recorder_win.cc',
259 'linux_util.cc',
260 'linux_util.h',
261 'md5.cc',
262 'md5.h',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100263 'message_loop/message_pump_android.cc',
264 'message_loop/message_pump_android.h',
265 'message_loop/message_pump_glib.cc',
266 'message_loop/message_pump_glib.h',
267 'message_loop/message_pump_gtk.cc',
268 'message_loop/message_pump_gtk.h',
269 'message_loop/message_pump_io_ios.cc',
270 'message_loop/message_pump_io_ios.h',
271 'message_loop/message_pump_observer.h',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100272 'message_loop/message_pump_libevent.cc',
273 'message_loop/message_pump_libevent.h',
274 'message_loop/message_pump_mac.h',
275 'message_loop/message_pump_mac.mm',
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100276 'message_loop/message_pump_x11.cc',
277 'message_loop/message_pump_x11.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000278 'metrics/field_trial.cc',
279 'metrics/field_trial.h',
280 'posix/file_descriptor_shuffle.cc',
281 'posix/file_descriptor_shuffle.h',
282 'sync_socket.h',
283 'sync_socket_win.cc',
284 'sync_socket_posix.cc',
285 ],
286 },
287 {
288 'target_name': 'base_i18n',
289 'type': '<(component)',
290 'variables': {
291 'enable_wexit_time_destructors': 1,
292 'optimize': 'max',
293 },
294 'dependencies': [
295 'base',
296 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
297 '../third_party/icu/icu.gyp:icui18n',
298 '../third_party/icu/icu.gyp:icuuc',
299 ],
300 'conditions': [
301 ['toolkit_uses_gtk==1', {
302 'dependencies': [
303 # i18n/rtl.cc uses gtk
304 '../build/linux/system.gyp:gtk',
305 ],
306 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000307 ['OS == "win"', {
308 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
309 'msvs_disabled_warnings': [
310 4267,
311 ],
312 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000313 ],
314 'export_dependent_settings': [
315 'base',
316 ],
317 'defines': [
318 'BASE_I18N_IMPLEMENTATION',
319 ],
320 'sources': [
321 'i18n/base_i18n_export.h',
322 'i18n/bidi_line_iterator.cc',
323 'i18n/bidi_line_iterator.h',
324 'i18n/break_iterator.cc',
325 'i18n/break_iterator.h',
326 'i18n/char_iterator.cc',
327 'i18n/char_iterator.h',
328 'i18n/case_conversion.cc',
329 'i18n/case_conversion.h',
330 'i18n/file_util_icu.cc',
331 'i18n/file_util_icu.h',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100332 'i18n/i18n_constants.cc',
333 'i18n/i18n_constants.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000334 'i18n/icu_encoding_detection.cc',
335 'i18n/icu_encoding_detection.h',
336 'i18n/icu_string_conversions.cc',
337 'i18n/icu_string_conversions.h',
338 'i18n/icu_util.cc',
339 'i18n/icu_util.h',
340 'i18n/number_formatting.cc',
341 'i18n/number_formatting.h',
342 'i18n/rtl.cc',
343 'i18n/rtl.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100344 'i18n/string_compare.cc',
345 'i18n/string_compare.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000346 'i18n/string_search.cc',
347 'i18n/string_search.h',
348 'i18n/time_formatting.cc',
349 'i18n/time_formatting.h',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000350 'i18n/timezone.cc',
351 'i18n/timezone.h',
352 ],
353 },
354 {
355 'target_name': 'base_message_loop_tests',
356 'type': 'static_library',
357 'dependencies': [
358 'base',
359 '../testing/gtest.gyp:gtest',
360 ],
361 'sources': [
362 'message_loop/message_loop_test.cc',
363 'message_loop/message_loop_test.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000364 ],
365 },
366 {
367 'target_name': 'base_prefs',
368 'type': '<(component)',
369 'variables': {
370 'enable_wexit_time_destructors': 1,
371 'optimize': 'max',
372 },
373 'dependencies': [
374 'base',
375 ],
376 'export_dependent_settings': [
377 'base',
378 ],
379 'defines': [
380 'BASE_PREFS_IMPLEMENTATION',
381 ],
382 'sources': [
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000383 'prefs/base_prefs_export.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000384 'prefs/default_pref_store.cc',
385 'prefs/default_pref_store.h',
386 'prefs/json_pref_store.cc',
387 'prefs/json_pref_store.h',
388 'prefs/overlay_user_pref_store.cc',
389 'prefs/overlay_user_pref_store.h',
390 'prefs/persistent_pref_store.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000391 'prefs/pref_change_registrar.cc',
392 'prefs/pref_change_registrar.h',
393 'prefs/pref_member.cc',
394 'prefs/pref_member.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000395 'prefs/pref_notifier.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000396 'prefs/pref_notifier_impl.cc',
397 'prefs/pref_notifier_impl.h',
398 'prefs/pref_observer.h',
399 'prefs/pref_registry.cc',
400 'prefs/pref_registry.h',
401 'prefs/pref_registry_simple.cc',
402 'prefs/pref_registry_simple.h',
403 'prefs/pref_service.cc',
404 'prefs/pref_service.h',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000405 'prefs/pref_service_factory.cc',
406 'prefs/pref_service_factory.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000407 'prefs/pref_store.cc',
408 'prefs/pref_store.h',
409 'prefs/pref_value_map.cc',
410 'prefs/pref_value_map.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000411 'prefs/pref_value_store.cc',
412 'prefs/pref_value_store.h',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000413 'prefs/scoped_user_pref_update.cc',
414 'prefs/scoped_user_pref_update.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000415 'prefs/value_map_pref_store.cc',
416 'prefs/value_map_pref_store.h',
417 ],
418 },
419 {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000420 'target_name': 'base_prefs_test_support',
421 'type': 'static_library',
422 'dependencies': [
423 'base',
424 'base_prefs',
425 '../testing/gmock.gyp:gmock',
426 ],
427 'sources': [
428 'prefs/mock_pref_change_callback.cc',
429 'prefs/pref_store_observer_mock.cc',
430 'prefs/pref_store_observer_mock.h',
431 'prefs/testing_pref_service.cc',
432 'prefs/testing_pref_service.h',
433 'prefs/testing_pref_store.cc',
434 'prefs/testing_pref_store.h',
435 ],
436 },
437 {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000438 # This is the subset of files from base that should not be used with a
439 # dynamic library. Note that this library cannot depend on base because
440 # base depends on base_static.
441 'target_name': 'base_static',
442 'type': 'static_library',
443 'variables': {
444 'enable_wexit_time_destructors': 1,
445 'optimize': 'max',
446 },
447 'toolsets': ['host', 'target'],
448 'sources': [
449 'base_switches.cc',
450 'base_switches.h',
451 'win/pe_image.cc',
452 'win/pe_image.h',
453 ],
454 'include_dirs': [
455 '..',
456 ],
457 },
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000458 # Include this target for a main() function that simply instantiates
459 # and runs a base::TestSuite.
460 {
461 'target_name': 'run_all_unittests',
462 'type': 'static_library',
463 'dependencies': [
464 'test_support_base',
465 ],
466 'sources': [
467 'test/run_all_unittests.cc',
468 ],
469 },
470 {
471 'target_name': 'base_unittests',
472 'type': '<(gtest_target_type)',
473 'sources': [
474 # Tests.
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100475 'android/activity_status_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000476 'android/jni_android_unittest.cc',
477 'android/jni_array_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000478 'android/jni_string_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000479 'android/path_utils_unittest.cc',
480 'android/scoped_java_ref_unittest.cc',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000481 'android/sys_utils_unittest.cc',
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100482 'async_socket_io_handler_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000483 'at_exit_unittest.cc',
484 'atomicops_unittest.cc',
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +0100485 'barrier_closure_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000486 'base64_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000487 'bind_unittest.cc',
488 'bind_unittest.nc',
489 'bits_unittest.cc',
490 'build_time_unittest.cc',
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +0100491 'callback_helpers_unittest.cc',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100492 'callback_list_unittest.cc',
493 'callback_list_unittest.nc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000494 'callback_unittest.cc',
495 'callback_unittest.nc',
496 'cancelable_callback_unittest.cc',
497 'command_line_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100498 'containers/hash_tables_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000499 'containers/linked_list_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000500 'containers/mru_cache_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000501 'containers/small_map_unittest.cc',
502 'containers/stack_container_unittest.cc',
503 'cpu_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000504 'debug/crash_logging_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000505 'debug/leak_tracker_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100506 'debug/proc_maps_linux_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000507 'debug/stack_trace_unittest.cc',
Ben Murdochbbcdd452013-07-25 10:06:34 +0100508 'debug/trace_event_memory_unittest.cc',
Torne (Richard Coles)d0247b12013-09-19 22:36:51 +0100509 'debug/trace_event_system_stats_monitor_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000510 'debug/trace_event_unittest.cc',
511 'debug/trace_event_unittest.h',
512 'debug/trace_event_win_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100513 'deferred_sequenced_task_runner_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000514 'environment_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000515 'file_util_unittest.cc',
516 'file_version_info_unittest.cc',
517 'files/dir_reader_posix_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000518 'files/file_path_unittest.cc',
519 'files/file_util_proxy_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000520 'files/important_file_writer_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000521 'files/scoped_temp_dir_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000522 'gmock_unittest.cc',
523 'guid_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000524 'id_map_unittest.cc',
525 'i18n/break_iterator_unittest.cc',
526 'i18n/char_iterator_unittest.cc',
527 'i18n/case_conversion_unittest.cc',
528 'i18n/file_util_icu_unittest.cc',
529 'i18n/icu_string_conversions_unittest.cc',
530 'i18n/number_formatting_unittest.cc',
531 'i18n/rtl_unittest.cc',
532 'i18n/string_search_unittest.cc',
533 'i18n/time_formatting_unittest.cc',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000534 'i18n/timezone_unittest.cc',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100535 'ini_parser_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000536 'ios/device_util_unittest.mm',
537 'json/json_parser_unittest.cc',
538 'json/json_reader_unittest.cc',
539 'json/json_value_converter_unittest.cc',
540 'json/json_value_serializer_unittest.cc',
541 'json/json_writer_unittest.cc',
542 'json/string_escape_unittest.cc',
543 'lazy_instance_unittest.cc',
544 'logging_unittest.cc',
545 'mac/bind_objc_block_unittest.mm',
546 'mac/foundation_util_unittest.mm',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000547 'mac/libdispatch_task_runner_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000548 'mac/mac_util_unittest.mm',
549 'mac/objc_property_releaser_unittest.mm',
Ben Murdocheb525c52013-07-10 11:40:50 +0100550 'mac/scoped_nsobject_unittest.mm',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000551 'mac/scoped_sending_event_unittest.mm',
552 'md5_unittest.cc',
553 'memory/aligned_memory_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000554 'memory/discardable_memory_unittest.cc',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000555 'memory/discardable_memory_provider_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000556 'memory/linked_ptr_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000557 'memory/ref_counted_memory_unittest.cc',
558 'memory/ref_counted_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000559 'memory/scoped_ptr_unittest.cc',
560 'memory/scoped_ptr_unittest.nc',
561 'memory/scoped_vector_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100562 'memory/shared_memory_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000563 'memory/singleton_unittest.cc',
564 'memory/weak_ptr_unittest.cc',
565 'memory/weak_ptr_unittest.nc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100566 'message_loop/message_loop_proxy_impl_unittest.cc',
567 'message_loop/message_loop_proxy_unittest.cc',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100568 'message_loop/message_loop_unittest.cc',
569 'message_loop/message_pump_glib_unittest.cc',
570 'message_loop/message_pump_io_ios_unittest.cc',
571 'message_loop/message_pump_libevent_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000572 'metrics/sample_map_unittest.cc',
573 'metrics/sample_vector_unittest.cc',
574 'metrics/bucket_ranges_unittest.cc',
575 'metrics/field_trial_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000576 'metrics/histogram_base_unittest.cc',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000577 'metrics/histogram_delta_serialization_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000578 'metrics/histogram_unittest.cc',
579 'metrics/sparse_histogram_unittest.cc',
580 'metrics/stats_table_unittest.cc',
581 'metrics/statistics_recorder_unittest.cc',
582 'observer_list_unittest.cc',
583 'os_compat_android_unittest.cc',
584 'path_service_unittest.cc',
585 'pickle_unittest.cc',
586 'platform_file_unittest.cc',
587 'posix/file_descriptor_shuffle_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000588 'posix/unix_domain_socket_linux_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100589 'power_monitor/power_monitor_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000590 'prefs/default_pref_store_unittest.cc',
591 'prefs/json_pref_store_unittest.cc',
592 'prefs/mock_pref_change_callback.h',
593 'prefs/overlay_user_pref_store_unittest.cc',
594 'prefs/pref_change_registrar_unittest.cc',
595 'prefs/pref_member_unittest.cc',
596 'prefs/pref_notifier_impl_unittest.cc',
597 'prefs/pref_service_unittest.cc',
598 'prefs/pref_value_map_unittest.cc',
599 'prefs/pref_value_store_unittest.cc',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000600 'prefs/scoped_user_pref_update_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100601 'process/memory_unittest.cc',
602 'process/memory_unittest_mac.h',
603 'process/memory_unittest_mac.mm',
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100604 'process/process_metrics_unittests.cc',
Ben Murdochca12bfa2013-07-23 11:17:05 +0100605 'process/process_util_unittest.cc',
606 'process/process_util_unittest_ios.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000607 'profiler/tracked_time_unittest.cc',
608 'rand_util_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000609 'safe_numerics_unittest.cc',
610 'safe_numerics_unittest.nc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100611 'scoped_clear_errno_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000612 'scoped_native_library_unittest.cc',
613 'scoped_observer.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000614 'security_unittest.cc',
615 'sequence_checker_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000616 'sha1_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000617 'stl_util_unittest.cc',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100618 'strings/nullable_string16_unittest.cc',
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100619 'strings/safe_sprintf_unittest.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100620 'strings/string16_unittest.cc',
621 'strings/stringprintf_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000622 'strings/string_number_conversions_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100623 'strings/string_piece_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000624 'strings/string_split_unittest.cc',
625 'strings/string_tokenizer_unittest.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100626 'strings/string_util_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000627 'strings/stringize_macros_unittest.cc',
628 'strings/sys_string_conversions_mac_unittest.mm',
629 'strings/sys_string_conversions_unittest.cc',
630 'strings/utf_offset_string_conversions_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100631 'strings/utf_string_conversions_unittest.cc',
Torne (Richard Coles)8bcbed82013-10-22 16:41:35 +0100632 'sync_socket_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000633 'synchronization/cancellation_flag_unittest.cc',
634 'synchronization/condition_variable_unittest.cc',
635 'synchronization/lock_unittest.cc',
636 'synchronization/waitable_event_unittest.cc',
637 'synchronization/waitable_event_watcher_unittest.cc',
638 'sys_info_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000639 'system_monitor/system_monitor_unittest.cc',
640 'task_runner_util_unittest.cc',
641 'template_util_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000642 'test/expectations/expectation_unittest.cc',
643 'test/expectations/parser_unittest.cc',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000644 'test/test_reg_util_win_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000645 'test/trace_event_analyzer_unittest.cc',
646 'threading/non_thread_safe_unittest.cc',
647 'threading/platform_thread_unittest.cc',
648 'threading/sequenced_worker_pool_unittest.cc',
649 'threading/simple_thread_unittest.cc',
650 'threading/thread_checker_unittest.cc',
651 'threading/thread_collision_warner_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000652 'threading/thread_id_name_manager_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000653 'threading/thread_local_storage_unittest.cc',
654 'threading/thread_local_unittest.cc',
655 'threading/thread_unittest.cc',
656 'threading/watchdog_unittest.cc',
657 'threading/worker_pool_posix_unittest.cc',
658 'threading/worker_pool_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100659 'time/pr_time_unittest.cc',
660 'time/time_unittest.cc',
661 'time/time_win_unittest.cc',
662 'timer/hi_res_timer_manager_unittest.cc',
663 'timer/timer_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000664 'tools_sanity_unittest.cc',
665 'tracked_objects_unittest.cc',
666 'tuple_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000667 'values_unittest.cc',
668 'version_unittest.cc',
669 'vlog_unittest.cc',
670 'win/dllmain.cc',
671 'win/enum_variant_unittest.cc',
672 'win/event_trace_consumer_unittest.cc',
673 'win/event_trace_controller_unittest.cc',
674 'win/event_trace_provider_unittest.cc',
675 'win/i18n_unittest.cc',
676 'win/iunknown_impl_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100677 'win/message_window_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000678 'win/object_watcher_unittest.cc',
679 'win/pe_image_unittest.cc',
680 'win/registry_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000681 'win/scoped_bstr_unittest.cc',
682 'win/scoped_comptr_unittest.cc',
683 'win/scoped_process_information_unittest.cc',
Ben Murdocheb525c52013-07-10 11:40:50 +0100684 'win/scoped_variant_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000685 'win/shortcut_unittest.cc',
686 'win/startup_information_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000687 'win/win_util_unittest.cc',
688 'win/wrapped_window_proc_unittest.cc',
689 ],
690 'dependencies': [
691 'base',
692 'base_i18n',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000693 'base_message_loop_tests',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000694 'base_prefs',
695 'base_prefs_test_support',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000696 'base_static',
697 'run_all_unittests',
698 'test_support_base',
699 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
700 '../testing/gmock.gyp:gmock',
701 '../testing/gtest.gyp:gtest',
702 '../third_party/icu/icu.gyp:icui18n',
703 '../third_party/icu/icu.gyp:icuuc',
704 ],
705 'includes': ['../build/nocompile.gypi'],
706 'variables': {
707 # TODO(ajwong): Is there a way to autodetect this?
708 'module_dir': 'base'
709 },
710 'conditions': [
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000711 ['desktop_linux == 1 or chromeos == 1', {
Ben Murdocheb525c52013-07-10 11:40:50 +0100712 'defines': [
713 'USE_SYMBOLIZE',
714 ],
715 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000716 ['OS == "android"', {
717 'dependencies': [
718 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
719 ],
720 'conditions': [
721 ['gtest_target_type == "shared_library"', {
722 'dependencies': [
723 '../testing/android/native_test.gyp:native_test_native_code',
724 ],
725 }],
726 ],
727 }],
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100728 ['OS == "ios" and _toolset != "host"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000729 'sources/': [
730 # Only test the iOS-meaningful portion of process_utils.
Ben Murdocheb525c52013-07-10 11:40:50 +0100731 ['exclude', '^process/memory_unittest'],
Ben Murdochca12bfa2013-07-23 11:17:05 +0100732 ['exclude', '^process/process_util_unittest\\.cc$'],
733 ['include', '^process/process_util_unittest_ios\\.cc$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000734 # Requires spawning processes.
735 ['exclude', '^metrics/stats_table_unittest\\.cc$'],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000736 # iOS does not use message_pump_libevent.
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100737 ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000738 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000739 'actions': [
740 {
741 'action_name': 'copy_test_data',
742 'variables': {
743 'test_data_files': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100744 'test/data',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000745 ],
746 'test_data_prefix': 'base',
747 },
748 'includes': [ '../build/copy_test_data_ios.gypi' ],
749 },
750 ],
751 }],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000752 ['desktop_linux == 1 or chromeos == 1', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000753 'sources!': [
754 'file_version_info_unittest.cc',
755 ],
756 'conditions': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000757 [ 'toolkit_uses_gtk==1', {
758 'sources': [
759 'nix/xdg_util_unittest.cc',
760 ],
761 'dependencies': [
762 '../build/linux/system.gyp:gtk',
763 ]
764 }],
765 ],
766 'dependencies': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000767 '../build/linux/system.gyp:ssl',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000768 ],
769 }],
770 ['use_x11 == 1', {
771 'dependencies': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000772 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
773 ],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000774 }],
775 ['use_glib == 1', {
776 'dependencies': [
777 '../build/linux/system.gyp:glib',
778 ],
779 }, { # use_glib == 0
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000780 'sources!': [
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100781 'message_loop/message_pump_glib_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000782 ]
783 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100784 ['use_ozone == 1', {
785 'sources!': [
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100786 'message_loop/message_pump_glib_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100787 ]
788 }],
Ben Murdocheb525c52013-07-10 11:40:50 +0100789 ['OS == "linux" and linux_use_tcmalloc==1', {
790 'dependencies': [
791 'allocator/allocator.gyp:allocator',
792 ],
793 },
794 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000795 ['OS == "win"', {
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100796 # This is needed to trigger the dll copy step on windows.
797 # TODO(mark): This should not be necessary.
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000798 'dependencies': [
799 '../third_party/icu/icu.gyp:icudata',
800 ],
801 'sources!': [
802 'file_descriptor_shuffle_unittest.cc',
803 'files/dir_reader_posix_unittest.cc',
804 'threading/worker_pool_posix_unittest.cc',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100805 'message_loop/message_pump_libevent_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000806 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000807 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
808 'msvs_disabled_warnings': [
809 4267,
810 ],
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100811 # This is needed so base_unittests uses the allocator shim, as
812 # SecurityTest.MemoryAllocationRestriction* tests are dependent
813 # on tcmalloc.
814 # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
815 # their own test suite.
816 'conditions': [
817 ['win_use_allocator_shim==1', {
818 'dependencies': [
819 'allocator/allocator.gyp:allocator',
820 ],
821 }],
822 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000823 }, { # OS != "win"
824 'dependencies': [
825 '../third_party/libevent/libevent.gyp:libevent'
826 ],
827 'sources/': [
828 ['exclude', '^win/'],
829 ],
830 'sources!': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000831 'win/win_util_unittest.cc',
832 ],
833 }],
Torne (Richard Coles)68043e12013-09-26 13:24:57 +0100834 ['use_aura==1 and use_x11==1', {
835 'sources': [
836 'x11/edid_parser_x11_unittest.cc',
837 ],
838 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000839 ['use_system_nspr==1', {
840 'dependencies': [
841 'third_party/nspr/nspr.gyp:nspr',
842 ],
843 }],
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000844 ['<(native_discardable_memory)==1', {
845 'sources!': [
846 'memory/discardable_memory_provider_unittest.cc',
847 ],
848 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000849 ], # conditions
850 'target_conditions': [
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100851 ['OS == "ios" and _toolset != "host"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000852 'sources/': [
853 # Pull in specific Mac files for iOS (which have been filtered out
854 # by file name rules).
855 ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
856 ['include', '^mac/bind_objc_block_unittest\\.mm$'],
Ben Murdocheb525c52013-07-10 11:40:50 +0100857 ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000858 ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
859 ],
860 }],
Ben Murdocheb525c52013-07-10 11:40:50 +0100861 ['OS == "android"', {
862 'sources/': [
863 ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
864 ],
865 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000866 ], # target_conditions
867 },
868 {
869 'target_name': 'test_support_base',
870 'type': 'static_library',
871 'dependencies': [
872 'base',
873 'base_static',
874 'base_i18n',
875 '../testing/gmock.gyp:gmock',
876 '../testing/gtest.gyp:gtest',
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100877 '../third_party/libxml/libxml.gyp:libxml',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100878 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000879 ],
880 'export_dependent_settings': [
881 'base',
882 ],
883 'conditions': [
884 ['toolkit_uses_gtk==1', {
885 'dependencies': [
886 # test_suite initializes GTK.
887 '../build/linux/system.gyp:gtk',
888 ],
889 }],
890 ['os_posix==0', {
891 'sources!': [
892 'test/scoped_locale.cc',
893 'test/scoped_locale.h',
894 ],
895 }],
896 ['os_bsd==1', {
897 'sources!': [
898 'test/test_file_util_linux.cc',
899 ],
900 }],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000901 ['OS == "android"', {
902 'dependencies': [
903 'base_unittests_jni_headers',
904 'base_java_unittest_support',
905 ],
906 'include_dirs': [
907 '<(SHARED_INTERMEDIATE_DIR)/base',
908 ],
909 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000910 ],
911 'sources': [
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000912 'test/expectations/expectation.cc',
913 'test/expectations/expectation.h',
914 'test/expectations/parser.cc',
915 'test/expectations/parser.h',
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100916 'test/gtest_xml_util.cc',
917 'test/gtest_xml_util.h',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100918 'test/launcher/test_launcher.cc',
919 'test/launcher/test_launcher.h',
Torne (Richard Coles)8bcbed82013-10-22 16:41:35 +0100920 'test/launcher/test_result.cc',
921 'test/launcher/test_result.h',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100922 'test/launcher/test_results_tracker.cc',
923 'test/launcher/test_results_tracker.h',
924 'test/launcher/unit_test_launcher.cc',
925 'test/launcher/unit_test_launcher.h',
926 'test/launcher/unit_test_launcher_ios.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000927 'test/mock_chrome_application_mac.h',
928 'test/mock_chrome_application_mac.mm',
929 'test/mock_devices_changed_observer.cc',
930 'test/mock_devices_changed_observer.h',
931 'test/mock_time_provider.cc',
932 'test/mock_time_provider.h',
933 'test/multiprocess_test.cc',
934 'test/multiprocess_test.h',
935 'test/multiprocess_test_android.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000936 'test/null_task_runner.cc',
937 'test/null_task_runner.h',
Torne (Richard Coles)d0247b12013-09-19 22:36:51 +0100938 'test/perf_log.cc',
939 'test/perf_log.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000940 'test/perf_test_suite.cc',
941 'test/perf_test_suite.h',
Torne (Richard Coles)d0247b12013-09-19 22:36:51 +0100942 'test/perf_time_logger.cc',
943 'test/perf_time_logger.h',
Ben Murdochba5b9a62013-08-12 14:20:17 +0100944 'test/power_monitor_test_base.cc',
945 'test/power_monitor_test_base.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000946 'test/scoped_locale.cc',
947 'test/scoped_locale.h',
948 'test/scoped_path_override.cc',
949 'test/scoped_path_override.h',
950 'test/sequenced_task_runner_test_template.cc',
951 'test/sequenced_task_runner_test_template.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000952 'test/sequenced_worker_pool_owner.cc',
953 'test/sequenced_worker_pool_owner.h',
954 'test/simple_test_clock.cc',
955 'test/simple_test_clock.h',
956 'test/simple_test_tick_clock.cc',
957 'test/simple_test_tick_clock.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000958 'test/task_runner_test_template.cc',
959 'test/task_runner_test_template.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100960 'test/test_file_util.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000961 'test/test_file_util.h',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000962 'test/test_file_util_android.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000963 'test/test_file_util_linux.cc',
964 'test/test_file_util_mac.cc',
965 'test/test_file_util_posix.cc',
966 'test/test_file_util_win.cc',
967 'test/test_listener_ios.h',
968 'test/test_listener_ios.mm',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000969 'test/test_pending_task.cc',
970 'test/test_pending_task.h',
971 'test/test_process_killer_win.cc',
972 'test/test_process_killer_win.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000973 'test/test_reg_util_win.cc',
974 'test/test_reg_util_win.h',
975 'test/test_shortcut_win.cc',
976 'test/test_shortcut_win.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000977 'test/test_simple_task_runner.cc',
978 'test/test_simple_task_runner.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000979 'test/test_suite.cc',
980 'test/test_suite.h',
981 'test/test_support_android.cc',
982 'test/test_support_android.h',
983 'test/test_support_ios.h',
984 'test/test_support_ios.mm',
985 'test/test_switches.cc',
986 'test/test_switches.h',
987 'test/test_timeouts.cc',
988 'test/test_timeouts.h',
989 'test/thread_test_helper.cc',
990 'test/thread_test_helper.h',
991 'test/trace_event_analyzer.cc',
992 'test/trace_event_analyzer.h',
993 'test/values_test_util.cc',
994 'test/values_test_util.h',
995 ],
996 'target_conditions': [
997 ['OS == "ios"', {
998 'sources/': [
999 # Pull in specific Mac files for iOS (which have been filtered out
1000 # by file name rules).
1001 ['include', '^test/test_file_util_mac\\.cc$'],
1002 ],
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +01001003 'sources!': [
1004 # iOS uses its own unit test launcher.
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001005 'test/launcher/unit_test_launcher.cc',
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +01001006 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001007 }],
1008 ], # target_conditions
1009 },
1010 {
1011 'target_name': 'test_support_perf',
1012 'type': 'static_library',
1013 'dependencies': [
1014 'base',
Torne (Richard Coles)d0247b12013-09-19 22:36:51 +01001015 'test_support_base',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001016 '../testing/gtest.gyp:gtest',
1017 ],
1018 'sources': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001019 'test/run_all_perftests.cc',
1020 ],
1021 'direct_dependent_settings': {
1022 'defines': [
1023 'PERF_TEST',
1024 ],
1025 },
1026 'conditions': [
1027 ['toolkit_uses_gtk==1', {
1028 'dependencies': [
1029 # Needed to handle the #include chain:
1030 # base/test/perf_test_suite.h
1031 # base/test/test_suite.h
1032 # gtk/gtk.h
1033 '../build/linux/system.gyp:gtk',
1034 ],
1035 }],
1036 ],
1037 },
1038 ],
1039 'conditions': [
1040 ['OS!="ios"', {
1041 'targets': [
1042 {
1043 'target_name': 'check_example',
1044 'type': 'executable',
1045 'sources': [
1046 'check_example.cc',
1047 ],
1048 'dependencies': [
1049 'base',
1050 ],
1051 },
1052 ],
1053 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001054 ['OS == "win" and target_arch=="ia32"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001055 'targets': [
1056 {
1057 'target_name': 'base_nacl_win64',
1058 'type': '<(component)',
1059 'variables': {
1060 'base_target': 1,
1061 },
1062 'dependencies': [
1063 'base_static_win64',
1064 'allocator/allocator.gyp:allocator_extension_thunks_win64',
1065 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1066 ],
1067 # TODO(gregoryd): direct_dependent_settings should be shared with the
1068 # 32-bit target, but it doesn't work due to a bug in gyp
1069 'direct_dependent_settings': {
1070 'include_dirs': [
1071 '..',
1072 ],
1073 },
1074 'defines': [
1075 '<@(nacl_win64_defines)',
1076 ],
1077 'sources!': [
1078 # base64.cc depends on modp_b64.
1079 'base64.cc',
1080 ],
1081 'configurations': {
1082 'Common_Base': {
1083 'msvs_target_platform': 'x64',
1084 },
1085 },
1086 'conditions': [
1087 ['component == "shared_library"', {
1088 'sources!': [
1089 'debug/debug_on_start_win.cc',
1090 ],
1091 }],
1092 ],
1093 },
1094 {
1095 'target_name': 'base_i18n_nacl_win64',
1096 'type': '<(component)',
1097 # TODO(gregoryd): direct_dependent_settings should be shared with the
1098 # 32-bit target, but it doesn't work due to a bug in gyp
1099 'direct_dependent_settings': {
1100 'include_dirs': [
1101 '..',
1102 ],
1103 },
1104 'defines': [
1105 '<@(nacl_win64_defines)',
1106 'BASE_I18N_IMPLEMENTATION',
1107 ],
1108 'include_dirs': [
1109 '..',
1110 ],
1111 'sources': [
1112 'i18n/icu_util_nacl_win64.cc',
1113 ],
1114 'configurations': {
1115 'Common_Base': {
1116 'msvs_target_platform': 'x64',
1117 },
1118 },
1119 },
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001120 {
1121 # TODO(rvargas): Remove this when gyp finally supports a clean model.
1122 # See bug 36232.
1123 'target_name': 'base_static_win64',
1124 'type': 'static_library',
1125 'sources': [
1126 'base_switches.cc',
1127 'base_switches.h',
1128 'win/pe_image.cc',
1129 'win/pe_image.h',
1130 ],
1131 'sources!': [
1132 # base64.cc depends on modp_b64.
1133 'base64.cc',
1134 ],
1135 'include_dirs': [
1136 '..',
1137 ],
1138 'configurations': {
1139 'Common_Base': {
1140 'msvs_target_platform': 'x64',
1141 },
1142 },
1143 'defines': [
1144 'NACL_WIN64',
1145 ],
1146 # TODO(rvargas): Bug 78117. Remove this.
1147 'msvs_disabled_warnings': [
1148 4244,
1149 ],
1150 },
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001151 ],
1152 }],
1153 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1154 'targets': [
1155 {
1156 'target_name': 'symbolize',
1157 'type': 'static_library',
1158 'toolsets': ['host', 'target'],
1159 'variables': {
1160 'chromium_code': 0,
1161 },
1162 'conditions': [
1163 ['OS == "solaris"', {
1164 'include_dirs': [
1165 '/usr/gnu/include',
1166 '/usr/gnu/include/libelf',
1167 ],
1168 },],
1169 ],
1170 'cflags': [
1171 '-Wno-sign-compare',
1172 ],
1173 'cflags!': [
1174 '-Wextra',
1175 ],
1176 'sources': [
1177 'third_party/symbolize/config.h',
1178 'third_party/symbolize/demangle.cc',
1179 'third_party/symbolize/demangle.h',
1180 'third_party/symbolize/glog/logging.h',
1181 'third_party/symbolize/glog/raw_logging.h',
1182 'third_party/symbolize/symbolize.cc',
1183 'third_party/symbolize/symbolize.h',
1184 'third_party/symbolize/utilities.h',
1185 ],
1186 'include_dirs': [
1187 '..',
1188 ],
1189 },
1190 {
1191 'target_name': 'xdg_mime',
1192 'type': 'static_library',
1193 'toolsets': ['host', 'target'],
1194 'variables': {
1195 'chromium_code': 0,
1196 },
1197 'cflags!': [
1198 '-Wextra',
1199 ],
1200 'sources': [
1201 'third_party/xdg_mime/xdgmime.c',
1202 'third_party/xdg_mime/xdgmime.h',
1203 'third_party/xdg_mime/xdgmimealias.c',
1204 'third_party/xdg_mime/xdgmimealias.h',
1205 'third_party/xdg_mime/xdgmimecache.c',
1206 'third_party/xdg_mime/xdgmimecache.h',
1207 'third_party/xdg_mime/xdgmimeglob.c',
1208 'third_party/xdg_mime/xdgmimeglob.h',
1209 'third_party/xdg_mime/xdgmimeicon.c',
1210 'third_party/xdg_mime/xdgmimeicon.h',
1211 'third_party/xdg_mime/xdgmimeint.c',
1212 'third_party/xdg_mime/xdgmimeint.h',
1213 'third_party/xdg_mime/xdgmimemagic.c',
1214 'third_party/xdg_mime/xdgmimemagic.h',
1215 'third_party/xdg_mime/xdgmimeparent.c',
1216 'third_party/xdg_mime/xdgmimeparent.h',
1217 ],
1218 },
1219 ],
1220 }],
1221 ['OS == "android"', {
1222 'targets': [
1223 {
1224 'target_name': 'base_jni_headers',
1225 'type': 'none',
1226 'sources': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001227 'android/java/src/org/chromium/base/ActivityStatus.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001228 'android/java/src/org/chromium/base/BuildInfo.java',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001229 'android/java/src/org/chromium/base/CommandLine.java',
1230 'android/java/src/org/chromium/base/ContentUriUtils.java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001231 'android/java/src/org/chromium/base/CpuFeatures.java',
1232 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001233 'android/java/src/org/chromium/base/MemoryPressureListener.java',
Ben Murdochbb1529c2013-08-08 10:24:53 +01001234 'android/java/src/org/chromium/base/JavaHandlerThread.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001235 'android/java/src/org/chromium/base/PathService.java',
1236 'android/java/src/org/chromium/base/PathUtils.java',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001237 'android/java/src/org/chromium/base/PowerMonitor.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001238 'android/java/src/org/chromium/base/SystemMessageHandler.java',
Ben Murdocheb525c52013-07-10 11:40:50 +01001239 'android/java/src/org/chromium/base/SysUtils.java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001240 'android/java/src/org/chromium/base/ThreadUtils.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001241 ],
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +01001242 'conditions': [
1243 ['google_tv==1', {
1244 'sources': [
1245 'android/java/src/org/chromium/base/ContextTypes.java',
1246 ],
1247 }],
1248 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001249 'variables': {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001250 'jni_gen_package': 'base',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001251 'jni_generator_ptr_type': 'long',
1252 },
1253 'includes': [ '../build/jni_generator.gypi' ],
1254 },
1255 {
1256 'target_name': 'base_unittests_jni_headers',
1257 'type': 'none',
1258 'sources': [
1259 'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1260 ],
1261 'variables': {
1262 'jni_gen_package': 'base',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001263 },
1264 'includes': [ '../build/jni_generator.gypi' ],
1265 },
1266 {
1267 'target_name': 'base_java',
1268 'type': 'none',
1269 'variables': {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001270 'java_in_dir': '../base/android/java',
1271 },
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001272 'dependencies': [
1273 'base_java_activity_state',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001274 'base_java_memory_pressure_level_list',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001275 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001276 'includes': [ '../build/java.gypi' ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001277 'conditions': [
1278 ['android_webview_build==0', {
1279 'dependencies': [
1280 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1281 ],
1282 }]
1283 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001284 },
1285 {
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001286 'target_name': 'base_java_unittest_support',
1287 'type': 'none',
1288 'dependencies': [
1289 'base_java',
1290 ],
1291 'variables': {
1292 'java_in_dir': '../base/test/android/java',
1293 },
1294 'includes': [ '../build/java.gypi' ],
1295 },
1296 {
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001297 'target_name': 'base_java_activity_state',
1298 'type': 'none',
1299 # This target is used to auto-generate ActivityState.java
1300 # from a template file. The source file contains a list of
1301 # Java constant declarations matching the ones in
1302 # android/activity_state_list.h.
1303 'sources': [
1304 'android/java/src/org/chromium/base/ActivityState.template',
1305 ],
1306 'variables': {
1307 'package_name': 'org/chromium/base',
1308 'template_deps': ['android/activity_state_list.h'],
1309 },
1310 'includes': [ '../build/android/java_cpp_template.gypi' ],
1311 },
1312 {
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +01001313 'target_name': 'base_java_memory_pressure_level_list',
1314 'type': 'none',
1315 'sources': [
1316 'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
1317 ],
1318 'variables': {
1319 'package_name': 'org/chromium/base',
1320 'template_deps': ['memory/memory_pressure_level_list.h'],
1321 },
1322 'includes': [ '../build/android/java_cpp_template.gypi' ],
1323 },
1324 {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001325 'target_name': 'base_java_test_support',
1326 'type': 'none',
1327 'dependencies': [
1328 'base_java',
1329 ],
1330 'variables': {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001331 'java_in_dir': '../base/test/android/javatests',
1332 },
1333 'includes': [ '../build/java.gypi' ],
1334 },
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001335 {
1336 'target_name': 'base_javatests',
1337 'type': 'none',
1338 'dependencies': [
1339 'base_java',
1340 'base_java_test_support',
1341 ],
1342 'variables': {
1343 'java_in_dir': '../base/android/javatests',
1344 },
1345 'includes': [ '../build/java.gypi' ],
1346 },
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001347 ],
1348 }],
1349 ['OS == "win"', {
1350 'targets': [
1351 {
1352 'target_name': 'debug_message',
1353 'type': 'executable',
1354 'sources': [
1355 'debug_message.cc',
1356 ],
1357 'msvs_settings': {
1358 'VCLinkerTool': {
1359 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1360 },
1361 },
1362 },
1363 ],
1364 }],
1365 # Special target to wrap a gtest_target_type == shared_library
1366 # base_unittests into an android apk for execution.
1367 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
1368 # in the gyp make generator. What is the correct way to extract
1369 # this path from gyp and into 'raw' for input to antfiles?
1370 # Hard-coding in the gypfile seems a poor choice.
1371 ['OS == "android" and gtest_target_type == "shared_library"', {
1372 'targets': [
1373 {
1374 'target_name': 'base_unittests_apk',
1375 'type': 'none',
1376 'dependencies': [
1377 'base_java',
1378 'base_unittests',
1379 ],
1380 'variables': {
1381 'test_suite_name': 'base_unittests',
1382 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
1383 },
1384 'includes': [ '../build/apk_test.gypi' ],
1385 },
1386 ],
1387 }],
1388 ['test_isolation_mode != "noop"', {
1389 'targets': [
1390 {
1391 'target_name': 'base_unittests_run',
1392 'type': 'none',
1393 'dependencies': [
1394 'base_unittests',
1395 ],
1396 'includes': [
1397 '../build/isolate.gypi',
1398 'base_unittests.isolate',
1399 ],
1400 'sources': [
1401 'base_unittests.isolate',
1402 ],
1403 },
1404 ],
1405 }],
1406 ],
1407}