Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1 | # 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': [ |
| 38 | ['use_glib==1', { |
| 39 | 'conditions': [ |
| 40 | ['chromeos==1', { |
| 41 | 'sources/': [ ['include', '_chromeos\\.cc$'] ] |
| 42 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 43 | ['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', |
| 54 | '../build/linux/system.gyp:glib', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 55 | 'xdg_mime', |
| 56 | ], |
| 57 | 'defines': [ |
| 58 | 'USE_SYMBOLIZE', |
| 59 | ], |
| 60 | 'cflags': [ |
| 61 | '-Wno-write-strings', |
| 62 | ], |
| 63 | 'export_dependent_settings': [ |
| 64 | '../build/linux/system.gyp:glib', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 65 | ], |
| 66 | }, { # use_glib!=1 |
| 67 | 'sources/': [ |
| 68 | ['exclude', '/xdg_user_dirs/'], |
| 69 | ['exclude', '_nss\\.cc$'], |
| 70 | ], |
| 71 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 72 | ['use_x11==1', { |
| 73 | 'dependencies': [ |
| 74 | '../build/linux/system.gyp:x11', |
| 75 | ], |
| 76 | 'export_dependent_settings': [ |
| 77 | '../build/linux/system.gyp:x11', |
| 78 | ], |
| 79 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 80 | ['OS == "android" and _toolset == "host"', { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 81 | # Always build base as a static_library for host toolset, even if |
| 82 | # we're doing a component build. Specifically, we only care about the |
| 83 | # target toolset using components since that's what developers are |
| 84 | # focusing on. In theory we should do this more generally for all |
| 85 | # targets when building for host, but getting the gyp magic |
| 86 | # per-toolset for the "component" variable is hard, and we really only |
| 87 | # need base on host. |
| 88 | 'type': 'static_library', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 89 | # Base for host support is the minimum required to run the |
| 90 | # ssl false start blacklist tool. It requires further changes |
| 91 | # to generically support host builds (and tests). |
| 92 | # Note: when building for host, gyp has OS == "android", |
| 93 | # hence the *_android.cc files are included but the actual code |
| 94 | # doesn't have OS_ANDROID / ANDROID defined. |
| 95 | 'conditions': [ |
| 96 | # Host build on linux depends on system.gyp::gtk as |
| 97 | # default linux build has TOOLKIT_GTK defined. |
| 98 | ['host_os == "linux"', { |
| 99 | 'sources/': [ |
| 100 | ['include', '^atomicops_internals_x86_gcc\\.cc$'], |
| 101 | ], |
| 102 | 'dependencies': [ |
| 103 | '../build/linux/system.gyp:gtk', |
| 104 | ], |
| 105 | 'export_dependent_settings': [ |
| 106 | '../build/linux/system.gyp:gtk', |
| 107 | ], |
| 108 | }], |
| 109 | ['host_os == "mac"', { |
| 110 | 'sources/': [ |
| 111 | ['exclude', '^native_library_linux\\.cc$'], |
| 112 | ['exclude', '^process_util_linux\\.cc$'], |
| 113 | ['exclude', '^sys_info_linux\\.cc$'], |
| 114 | ['exclude', '^sys_string_conversions_linux\\.cc$'], |
| 115 | ['exclude', '^worker_pool_linux\\.cc$'], |
| 116 | ], |
| 117 | }], |
| 118 | ], |
| 119 | }], |
| 120 | ['OS == "android" and _toolset == "target"', { |
| 121 | 'conditions': [ |
| 122 | ['target_arch == "ia32"', { |
| 123 | 'sources/': [ |
| 124 | ['include', '^atomicops_internals_x86_gcc\\.cc$'], |
| 125 | ], |
| 126 | }], |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 127 | ['target_arch == "mipsel"', { |
| 128 | 'sources/': [ |
| 129 | ['include', '^atomicops_internals_mips_gcc\\.cc$'], |
| 130 | ], |
| 131 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 132 | ], |
| 133 | 'dependencies': [ |
| 134 | 'base_jni_headers', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 135 | '../third_party/ashmem/ashmem.gyp:ashmem', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 136 | ], |
| 137 | 'include_dirs': [ |
| 138 | '<(SHARED_INTERMEDIATE_DIR)/base', |
| 139 | ], |
| 140 | 'link_settings': { |
| 141 | 'libraries': [ |
| 142 | '-llog', |
| 143 | ], |
| 144 | }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 145 | 'sources!': [ |
| 146 | 'debug/stack_trace_posix.cc', |
| 147 | ], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 148 | 'includes': [ |
| 149 | '../build/android/cpufeatures.gypi', |
| 150 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 151 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 152 | ['OS == "android" and _toolset == "target" and android_webview_build == 0', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 153 | 'dependencies': [ |
| 154 | 'base_java', |
| 155 | ], |
| 156 | }], |
| 157 | ['os_bsd==1', { |
| 158 | 'include_dirs': [ |
| 159 | '/usr/local/include', |
| 160 | ], |
| 161 | 'link_settings': { |
| 162 | 'libraries': [ |
| 163 | '-L/usr/local/lib -lexecinfo', |
| 164 | ], |
| 165 | }, |
| 166 | }], |
| 167 | ['OS == "linux"', { |
| 168 | 'link_settings': { |
| 169 | 'libraries': [ |
| 170 | # We need rt for clock_gettime(). |
| 171 | '-lrt', |
| 172 | # For 'native_library_linux.cc' |
| 173 | '-ldl', |
| 174 | ], |
| 175 | }, |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 176 | 'conditions': [ |
| 177 | ['linux_use_tcmalloc==0', { |
| 178 | 'defines': [ |
| 179 | 'NO_TCMALLOC', |
| 180 | ], |
| 181 | 'direct_dependent_settings': { |
| 182 | 'defines': [ |
| 183 | 'NO_TCMALLOC', |
| 184 | ], |
| 185 | }, |
| 186 | }], |
| 187 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 188 | }], |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 189 | ['OS == "mac" or (OS == "ios" and _toolset == "host")', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 190 | 'link_settings': { |
| 191 | 'libraries': [ |
| 192 | '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', |
| 193 | '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', |
| 194 | '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', |
| 195 | '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', |
| 196 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 197 | '$(SDKROOT)/System/Library/Frameworks/IOKit.framework', |
| 198 | '$(SDKROOT)/System/Library/Frameworks/Security.framework', |
| 199 | ], |
| 200 | }, |
| 201 | 'dependencies': [ |
| 202 | '../third_party/mach_override/mach_override.gyp:mach_override', |
| 203 | ], |
| 204 | }], |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 205 | ['OS == "ios" and _toolset != "host"', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 206 | 'link_settings': { |
| 207 | 'libraries': [ |
| 208 | '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', |
| 209 | '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework', |
| 210 | '$(SDKROOT)/System/Library/Frameworks/CoreText.framework', |
| 211 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 212 | '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', |
| 213 | ], |
| 214 | }, |
| 215 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 216 | ['OS != "win" and OS != "ios"', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 217 | 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'], |
| 218 | },], |
| 219 | ['component=="shared_library"', { |
| 220 | 'conditions': [ |
| 221 | ['OS=="win"', { |
| 222 | 'sources!': [ |
| 223 | 'debug/debug_on_start_win.cc', |
| 224 | ], |
| 225 | }], |
| 226 | ], |
| 227 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 228 | ['use_system_nspr==1', { |
| 229 | 'dependencies': [ |
| 230 | 'third_party/nspr/nspr.gyp:nspr', |
| 231 | ], |
| 232 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 233 | ], |
| 234 | 'sources': [ |
| 235 | 'third_party/nspr/prcpucfg.h', |
| 236 | 'third_party/nspr/prcpucfg_win.h', |
| 237 | 'third_party/nspr/prtypes.h', |
| 238 | 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc', |
| 239 | 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h', |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 240 | 'async_socket_io_handler.h', |
| 241 | 'async_socket_io_handler_posix.cc', |
| 242 | 'async_socket_io_handler_win.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 243 | 'auto_reset.h', |
| 244 | 'event_recorder.h', |
| 245 | 'event_recorder_stubs.cc', |
| 246 | 'event_recorder_win.cc', |
| 247 | 'linux_util.cc', |
| 248 | 'linux_util.h', |
| 249 | 'md5.cc', |
| 250 | 'md5.h', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 251 | 'message_loop/message_pump_android.cc', |
| 252 | 'message_loop/message_pump_android.h', |
| 253 | 'message_loop/message_pump_glib.cc', |
| 254 | 'message_loop/message_pump_glib.h', |
| 255 | 'message_loop/message_pump_gtk.cc', |
| 256 | 'message_loop/message_pump_gtk.h', |
| 257 | 'message_loop/message_pump_io_ios.cc', |
| 258 | 'message_loop/message_pump_io_ios.h', |
| 259 | 'message_loop/message_pump_observer.h', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 260 | 'message_loop/message_pump_libevent.cc', |
| 261 | 'message_loop/message_pump_libevent.h', |
| 262 | 'message_loop/message_pump_mac.h', |
| 263 | 'message_loop/message_pump_mac.mm', |
Torne (Richard Coles) | 58537e2 | 2013-09-12 12:10:22 +0100 | [diff] [blame^] | 264 | 'message_loop/message_pump_x11.cc', |
| 265 | 'message_loop/message_pump_x11.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 266 | 'metrics/field_trial.cc', |
| 267 | 'metrics/field_trial.h', |
| 268 | 'posix/file_descriptor_shuffle.cc', |
| 269 | 'posix/file_descriptor_shuffle.h', |
| 270 | 'sync_socket.h', |
| 271 | 'sync_socket_win.cc', |
| 272 | 'sync_socket_posix.cc', |
| 273 | ], |
| 274 | }, |
| 275 | { |
| 276 | 'target_name': 'base_i18n', |
| 277 | 'type': '<(component)', |
| 278 | 'variables': { |
| 279 | 'enable_wexit_time_destructors': 1, |
| 280 | 'optimize': 'max', |
| 281 | }, |
| 282 | 'dependencies': [ |
| 283 | 'base', |
| 284 | 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| 285 | '../third_party/icu/icu.gyp:icui18n', |
| 286 | '../third_party/icu/icu.gyp:icuuc', |
| 287 | ], |
| 288 | 'conditions': [ |
| 289 | ['toolkit_uses_gtk==1', { |
| 290 | 'dependencies': [ |
| 291 | # i18n/rtl.cc uses gtk |
| 292 | '../build/linux/system.gyp:gtk', |
| 293 | ], |
| 294 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 295 | ['OS == "win"', { |
| 296 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 297 | 'msvs_disabled_warnings': [ |
| 298 | 4267, |
| 299 | ], |
| 300 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 301 | ], |
| 302 | 'export_dependent_settings': [ |
| 303 | 'base', |
| 304 | ], |
| 305 | 'defines': [ |
| 306 | 'BASE_I18N_IMPLEMENTATION', |
| 307 | ], |
| 308 | 'sources': [ |
| 309 | 'i18n/base_i18n_export.h', |
| 310 | 'i18n/bidi_line_iterator.cc', |
| 311 | 'i18n/bidi_line_iterator.h', |
| 312 | 'i18n/break_iterator.cc', |
| 313 | 'i18n/break_iterator.h', |
| 314 | 'i18n/char_iterator.cc', |
| 315 | 'i18n/char_iterator.h', |
| 316 | 'i18n/case_conversion.cc', |
| 317 | 'i18n/case_conversion.h', |
| 318 | 'i18n/file_util_icu.cc', |
| 319 | 'i18n/file_util_icu.h', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 320 | 'i18n/i18n_constants.cc', |
| 321 | 'i18n/i18n_constants.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 322 | 'i18n/icu_encoding_detection.cc', |
| 323 | 'i18n/icu_encoding_detection.h', |
| 324 | 'i18n/icu_string_conversions.cc', |
| 325 | 'i18n/icu_string_conversions.h', |
| 326 | 'i18n/icu_util.cc', |
| 327 | 'i18n/icu_util.h', |
| 328 | 'i18n/number_formatting.cc', |
| 329 | 'i18n/number_formatting.h', |
| 330 | 'i18n/rtl.cc', |
| 331 | 'i18n/rtl.h', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 332 | 'i18n/string_compare.cc', |
| 333 | 'i18n/string_compare.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 334 | 'i18n/string_search.cc', |
| 335 | 'i18n/string_search.h', |
| 336 | 'i18n/time_formatting.cc', |
| 337 | 'i18n/time_formatting.h', |
| 338 | ], |
| 339 | }, |
| 340 | { |
| 341 | 'target_name': 'base_prefs', |
| 342 | 'type': '<(component)', |
| 343 | 'variables': { |
| 344 | 'enable_wexit_time_destructors': 1, |
| 345 | 'optimize': 'max', |
| 346 | }, |
| 347 | 'dependencies': [ |
| 348 | 'base', |
| 349 | ], |
| 350 | 'export_dependent_settings': [ |
| 351 | 'base', |
| 352 | ], |
| 353 | 'defines': [ |
| 354 | 'BASE_PREFS_IMPLEMENTATION', |
| 355 | ], |
| 356 | 'sources': [ |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 357 | 'prefs/base_prefs_export.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 358 | 'prefs/default_pref_store.cc', |
| 359 | 'prefs/default_pref_store.h', |
| 360 | 'prefs/json_pref_store.cc', |
| 361 | 'prefs/json_pref_store.h', |
| 362 | 'prefs/overlay_user_pref_store.cc', |
| 363 | 'prefs/overlay_user_pref_store.h', |
| 364 | 'prefs/persistent_pref_store.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 365 | 'prefs/pref_change_registrar.cc', |
| 366 | 'prefs/pref_change_registrar.h', |
| 367 | 'prefs/pref_member.cc', |
| 368 | 'prefs/pref_member.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 369 | 'prefs/pref_notifier.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 370 | 'prefs/pref_notifier_impl.cc', |
| 371 | 'prefs/pref_notifier_impl.h', |
| 372 | 'prefs/pref_observer.h', |
| 373 | 'prefs/pref_registry.cc', |
| 374 | 'prefs/pref_registry.h', |
| 375 | 'prefs/pref_registry_simple.cc', |
| 376 | 'prefs/pref_registry_simple.h', |
| 377 | 'prefs/pref_service.cc', |
| 378 | 'prefs/pref_service.h', |
| 379 | 'prefs/pref_service_builder.cc', |
| 380 | 'prefs/pref_service_builder.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 381 | 'prefs/pref_store.cc', |
| 382 | 'prefs/pref_store.h', |
| 383 | 'prefs/pref_value_map.cc', |
| 384 | 'prefs/pref_value_map.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 385 | 'prefs/pref_value_store.cc', |
| 386 | 'prefs/pref_value_store.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 387 | 'prefs/value_map_pref_store.cc', |
| 388 | 'prefs/value_map_pref_store.h', |
| 389 | ], |
| 390 | }, |
| 391 | { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 392 | 'target_name': 'base_prefs_test_support', |
| 393 | 'type': 'static_library', |
| 394 | 'dependencies': [ |
| 395 | 'base', |
| 396 | 'base_prefs', |
| 397 | '../testing/gmock.gyp:gmock', |
| 398 | ], |
| 399 | 'sources': [ |
| 400 | 'prefs/mock_pref_change_callback.cc', |
| 401 | 'prefs/pref_store_observer_mock.cc', |
| 402 | 'prefs/pref_store_observer_mock.h', |
| 403 | 'prefs/testing_pref_service.cc', |
| 404 | 'prefs/testing_pref_service.h', |
| 405 | 'prefs/testing_pref_store.cc', |
| 406 | 'prefs/testing_pref_store.h', |
| 407 | ], |
| 408 | }, |
| 409 | { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 410 | # This is the subset of files from base that should not be used with a |
| 411 | # dynamic library. Note that this library cannot depend on base because |
| 412 | # base depends on base_static. |
| 413 | 'target_name': 'base_static', |
| 414 | 'type': 'static_library', |
| 415 | 'variables': { |
| 416 | 'enable_wexit_time_destructors': 1, |
| 417 | 'optimize': 'max', |
| 418 | }, |
| 419 | 'toolsets': ['host', 'target'], |
| 420 | 'sources': [ |
| 421 | 'base_switches.cc', |
| 422 | 'base_switches.h', |
| 423 | 'win/pe_image.cc', |
| 424 | 'win/pe_image.h', |
| 425 | ], |
| 426 | 'include_dirs': [ |
| 427 | '..', |
| 428 | ], |
| 429 | }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 430 | # Include this target for a main() function that simply instantiates |
| 431 | # and runs a base::TestSuite. |
| 432 | { |
| 433 | 'target_name': 'run_all_unittests', |
| 434 | 'type': 'static_library', |
| 435 | 'dependencies': [ |
| 436 | 'test_support_base', |
| 437 | ], |
| 438 | 'sources': [ |
| 439 | 'test/run_all_unittests.cc', |
| 440 | ], |
| 441 | }, |
| 442 | { |
| 443 | 'target_name': 'base_unittests', |
| 444 | 'type': '<(gtest_target_type)', |
| 445 | 'sources': [ |
| 446 | # Tests. |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 447 | 'android/activity_status_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 448 | 'android/jni_android_unittest.cc', |
| 449 | 'android/jni_array_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 450 | 'android/jni_string_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 451 | 'android/path_utils_unittest.cc', |
| 452 | 'android/scoped_java_ref_unittest.cc', |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 453 | 'async_socket_io_handler_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 454 | 'at_exit_unittest.cc', |
| 455 | 'atomicops_unittest.cc', |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 456 | 'barrier_closure_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 457 | 'base64_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 458 | 'bind_unittest.cc', |
| 459 | 'bind_unittest.nc', |
| 460 | 'bits_unittest.cc', |
| 461 | 'build_time_unittest.cc', |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 462 | 'callback_helpers_unittest.cc', |
Torne (Richard Coles) | 58537e2 | 2013-09-12 12:10:22 +0100 | [diff] [blame^] | 463 | 'callback_registry_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 464 | 'callback_unittest.cc', |
| 465 | 'callback_unittest.nc', |
| 466 | 'cancelable_callback_unittest.cc', |
| 467 | 'command_line_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 468 | 'containers/hash_tables_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 469 | 'containers/linked_list_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 470 | 'containers/mru_cache_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 471 | 'containers/small_map_unittest.cc', |
| 472 | 'containers/stack_container_unittest.cc', |
| 473 | 'cpu_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 474 | 'debug/crash_logging_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 475 | 'debug/leak_tracker_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 476 | 'debug/proc_maps_linux_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 477 | 'debug/stack_trace_unittest.cc', |
Ben Murdoch | bbcdd45 | 2013-07-25 10:06:34 +0100 | [diff] [blame] | 478 | 'debug/trace_event_memory_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 479 | 'debug/trace_event_unittest.cc', |
| 480 | 'debug/trace_event_unittest.h', |
| 481 | 'debug/trace_event_win_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 482 | 'deferred_sequenced_task_runner_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 483 | 'environment_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 484 | 'file_util_unittest.cc', |
| 485 | 'file_version_info_unittest.cc', |
| 486 | 'files/dir_reader_posix_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 487 | 'files/file_path_unittest.cc', |
| 488 | 'files/file_util_proxy_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 489 | 'files/important_file_writer_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 490 | 'files/scoped_temp_dir_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 491 | 'gmock_unittest.cc', |
| 492 | 'guid_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 493 | 'id_map_unittest.cc', |
| 494 | 'i18n/break_iterator_unittest.cc', |
| 495 | 'i18n/char_iterator_unittest.cc', |
| 496 | 'i18n/case_conversion_unittest.cc', |
| 497 | 'i18n/file_util_icu_unittest.cc', |
| 498 | 'i18n/icu_string_conversions_unittest.cc', |
| 499 | 'i18n/number_formatting_unittest.cc', |
| 500 | 'i18n/rtl_unittest.cc', |
| 501 | 'i18n/string_search_unittest.cc', |
| 502 | 'i18n/time_formatting_unittest.cc', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 503 | 'ini_parser_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 504 | 'ios/device_util_unittest.mm', |
| 505 | 'json/json_parser_unittest.cc', |
| 506 | 'json/json_reader_unittest.cc', |
| 507 | 'json/json_value_converter_unittest.cc', |
| 508 | 'json/json_value_serializer_unittest.cc', |
| 509 | 'json/json_writer_unittest.cc', |
| 510 | 'json/string_escape_unittest.cc', |
| 511 | 'lazy_instance_unittest.cc', |
| 512 | 'logging_unittest.cc', |
| 513 | 'mac/bind_objc_block_unittest.mm', |
| 514 | 'mac/foundation_util_unittest.mm', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 515 | 'mac/libdispatch_task_runner_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 516 | 'mac/mac_util_unittest.mm', |
| 517 | 'mac/objc_property_releaser_unittest.mm', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 518 | 'mac/scoped_nsobject_unittest.mm', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 519 | 'mac/scoped_sending_event_unittest.mm', |
| 520 | 'md5_unittest.cc', |
| 521 | 'memory/aligned_memory_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 522 | 'memory/discardable_memory_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 523 | 'memory/linked_ptr_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 524 | 'memory/ref_counted_memory_unittest.cc', |
| 525 | 'memory/ref_counted_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 526 | 'memory/scoped_ptr_unittest.cc', |
| 527 | 'memory/scoped_ptr_unittest.nc', |
| 528 | 'memory/scoped_vector_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 529 | 'memory/shared_memory_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 530 | 'memory/singleton_unittest.cc', |
| 531 | 'memory/weak_ptr_unittest.cc', |
| 532 | 'memory/weak_ptr_unittest.nc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 533 | 'message_loop/message_loop_proxy_impl_unittest.cc', |
| 534 | 'message_loop/message_loop_proxy_unittest.cc', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 535 | 'message_loop/message_loop_unittest.cc', |
| 536 | 'message_loop/message_pump_glib_unittest.cc', |
| 537 | 'message_loop/message_pump_io_ios_unittest.cc', |
| 538 | 'message_loop/message_pump_libevent_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 539 | 'metrics/sample_map_unittest.cc', |
| 540 | 'metrics/sample_vector_unittest.cc', |
| 541 | 'metrics/bucket_ranges_unittest.cc', |
| 542 | 'metrics/field_trial_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 543 | 'metrics/histogram_base_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 544 | 'metrics/histogram_unittest.cc', |
| 545 | 'metrics/sparse_histogram_unittest.cc', |
| 546 | 'metrics/stats_table_unittest.cc', |
| 547 | 'metrics/statistics_recorder_unittest.cc', |
| 548 | 'observer_list_unittest.cc', |
| 549 | 'os_compat_android_unittest.cc', |
| 550 | 'path_service_unittest.cc', |
| 551 | 'pickle_unittest.cc', |
| 552 | 'platform_file_unittest.cc', |
| 553 | 'posix/file_descriptor_shuffle_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 554 | 'posix/unix_domain_socket_linux_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 555 | 'power_monitor/power_monitor_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 556 | 'prefs/default_pref_store_unittest.cc', |
| 557 | 'prefs/json_pref_store_unittest.cc', |
| 558 | 'prefs/mock_pref_change_callback.h', |
| 559 | 'prefs/overlay_user_pref_store_unittest.cc', |
| 560 | 'prefs/pref_change_registrar_unittest.cc', |
| 561 | 'prefs/pref_member_unittest.cc', |
| 562 | 'prefs/pref_notifier_impl_unittest.cc', |
| 563 | 'prefs/pref_service_unittest.cc', |
| 564 | 'prefs/pref_value_map_unittest.cc', |
| 565 | 'prefs/pref_value_store_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 566 | 'process/memory_unittest.cc', |
| 567 | 'process/memory_unittest_mac.h', |
| 568 | 'process/memory_unittest_mac.mm', |
Torne (Richard Coles) | 58537e2 | 2013-09-12 12:10:22 +0100 | [diff] [blame^] | 569 | 'process/process_metrics_unittests.cc', |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 570 | 'process/process_util_unittest.cc', |
| 571 | 'process/process_util_unittest_ios.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 572 | 'profiler/tracked_time_unittest.cc', |
| 573 | 'rand_util_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 574 | 'safe_numerics_unittest.cc', |
| 575 | 'safe_numerics_unittest.nc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 576 | 'scoped_clear_errno_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 577 | 'scoped_native_library_unittest.cc', |
| 578 | 'scoped_observer.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 579 | 'security_unittest.cc', |
| 580 | 'sequence_checker_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 581 | 'sha1_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 582 | 'stl_util_unittest.cc', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 583 | 'strings/nullable_string16_unittest.cc', |
Torne (Richard Coles) | 58537e2 | 2013-09-12 12:10:22 +0100 | [diff] [blame^] | 584 | 'strings/safe_sprintf_unittest.cc', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 585 | 'strings/string16_unittest.cc', |
| 586 | 'strings/stringprintf_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 587 | 'strings/string_number_conversions_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 588 | 'strings/string_piece_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 589 | 'strings/string_split_unittest.cc', |
| 590 | 'strings/string_tokenizer_unittest.cc', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 591 | 'strings/string_util_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 592 | 'strings/stringize_macros_unittest.cc', |
| 593 | 'strings/sys_string_conversions_mac_unittest.mm', |
| 594 | 'strings/sys_string_conversions_unittest.cc', |
| 595 | 'strings/utf_offset_string_conversions_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 596 | 'strings/utf_string_conversions_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 597 | 'synchronization/cancellation_flag_unittest.cc', |
| 598 | 'synchronization/condition_variable_unittest.cc', |
| 599 | 'synchronization/lock_unittest.cc', |
| 600 | 'synchronization/waitable_event_unittest.cc', |
| 601 | 'synchronization/waitable_event_watcher_unittest.cc', |
| 602 | 'sys_info_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 603 | 'system_monitor/system_monitor_unittest.cc', |
| 604 | 'task_runner_util_unittest.cc', |
| 605 | 'template_util_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 606 | 'test/expectations/expectation_unittest.cc', |
| 607 | 'test/expectations/parser_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 608 | 'test/trace_event_analyzer_unittest.cc', |
| 609 | 'threading/non_thread_safe_unittest.cc', |
| 610 | 'threading/platform_thread_unittest.cc', |
| 611 | 'threading/sequenced_worker_pool_unittest.cc', |
| 612 | 'threading/simple_thread_unittest.cc', |
| 613 | 'threading/thread_checker_unittest.cc', |
| 614 | 'threading/thread_collision_warner_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 615 | 'threading/thread_id_name_manager_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 616 | 'threading/thread_local_storage_unittest.cc', |
| 617 | 'threading/thread_local_unittest.cc', |
| 618 | 'threading/thread_unittest.cc', |
| 619 | 'threading/watchdog_unittest.cc', |
| 620 | 'threading/worker_pool_posix_unittest.cc', |
| 621 | 'threading/worker_pool_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 622 | 'time/pr_time_unittest.cc', |
| 623 | 'time/time_unittest.cc', |
| 624 | 'time/time_win_unittest.cc', |
| 625 | 'timer/hi_res_timer_manager_unittest.cc', |
| 626 | 'timer/timer_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 627 | 'tools_sanity_unittest.cc', |
| 628 | 'tracked_objects_unittest.cc', |
| 629 | 'tuple_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 630 | 'values_unittest.cc', |
| 631 | 'version_unittest.cc', |
| 632 | 'vlog_unittest.cc', |
| 633 | 'win/dllmain.cc', |
| 634 | 'win/enum_variant_unittest.cc', |
| 635 | 'win/event_trace_consumer_unittest.cc', |
| 636 | 'win/event_trace_controller_unittest.cc', |
| 637 | 'win/event_trace_provider_unittest.cc', |
| 638 | 'win/i18n_unittest.cc', |
| 639 | 'win/iunknown_impl_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 640 | 'win/message_window_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 641 | 'win/object_watcher_unittest.cc', |
| 642 | 'win/pe_image_unittest.cc', |
| 643 | 'win/registry_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 644 | 'win/scoped_bstr_unittest.cc', |
| 645 | 'win/scoped_comptr_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 646 | 'win/scoped_handle_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 647 | 'win/scoped_process_information_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 648 | 'win/scoped_variant_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 649 | 'win/shortcut_unittest.cc', |
| 650 | 'win/startup_information_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 651 | 'win/win_util_unittest.cc', |
| 652 | 'win/wrapped_window_proc_unittest.cc', |
| 653 | ], |
| 654 | 'dependencies': [ |
| 655 | 'base', |
| 656 | 'base_i18n', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 657 | 'base_prefs', |
| 658 | 'base_prefs_test_support', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 659 | 'base_static', |
| 660 | 'run_all_unittests', |
| 661 | 'test_support_base', |
| 662 | 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| 663 | '../testing/gmock.gyp:gmock', |
| 664 | '../testing/gtest.gyp:gtest', |
| 665 | '../third_party/icu/icu.gyp:icui18n', |
| 666 | '../third_party/icu/icu.gyp:icuuc', |
| 667 | ], |
| 668 | 'includes': ['../build/nocompile.gypi'], |
| 669 | 'variables': { |
| 670 | # TODO(ajwong): Is there a way to autodetect this? |
| 671 | 'module_dir': 'base' |
| 672 | }, |
| 673 | 'conditions': [ |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 674 | ['use_glib==1', { |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 675 | 'defines': [ |
| 676 | 'USE_SYMBOLIZE', |
| 677 | ], |
| 678 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 679 | ['OS == "android"', { |
| 680 | 'dependencies': [ |
| 681 | 'android/jni_generator/jni_generator.gyp:jni_generator_tests', |
| 682 | ], |
| 683 | 'conditions': [ |
| 684 | ['gtest_target_type == "shared_library"', { |
| 685 | 'dependencies': [ |
| 686 | '../testing/android/native_test.gyp:native_test_native_code', |
| 687 | ], |
| 688 | }], |
| 689 | ], |
| 690 | }], |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 691 | ['OS == "ios" and _toolset != "host"', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 692 | 'sources/': [ |
| 693 | # Only test the iOS-meaningful portion of process_utils. |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 694 | ['exclude', '^process/memory_unittest'], |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 695 | ['exclude', '^process/process_util_unittest\\.cc$'], |
| 696 | ['include', '^process/process_util_unittest_ios\\.cc$'], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 697 | # Requires spawning processes. |
| 698 | ['exclude', '^metrics/stats_table_unittest\\.cc$'], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 699 | # iOS does not use message_pump_libevent. |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 700 | ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 701 | ], |
| 702 | 'conditions': [ |
| 703 | ['coverage != 0', { |
| 704 | 'sources!': [ |
| 705 | # These sources can't be built with coverage due to a toolchain |
| 706 | # bug: http://openradar.appspot.com/radar?id=1499403 |
| 707 | 'json/json_reader_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 708 | 'strings/string_piece_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 709 | |
| 710 | # These tests crash when run with coverage turned on due to an |
| 711 | # issue with llvm_gcda_increment_indirect_counter: |
| 712 | # http://crbug.com/156058 |
| 713 | 'debug/trace_event_unittest.cc', |
| 714 | 'debug/trace_event_unittest.h', |
| 715 | 'logging_unittest.cc', |
| 716 | 'string_util_unittest.cc', |
| 717 | 'test/trace_event_analyzer_unittest.cc', |
| 718 | 'utf_offset_string_conversions_unittest.cc', |
| 719 | ], |
| 720 | }], |
| 721 | ], |
| 722 | 'actions': [ |
| 723 | { |
| 724 | 'action_name': 'copy_test_data', |
| 725 | 'variables': { |
| 726 | 'test_data_files': [ |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 727 | 'test/data', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 728 | ], |
| 729 | 'test_data_prefix': 'base', |
| 730 | }, |
| 731 | 'includes': [ '../build/copy_test_data_ios.gypi' ], |
| 732 | }, |
| 733 | ], |
| 734 | }], |
| 735 | ['use_glib==1', { |
| 736 | 'sources!': [ |
| 737 | 'file_version_info_unittest.cc', |
| 738 | ], |
| 739 | 'conditions': [ |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 740 | [ 'toolkit_uses_gtk==1', { |
| 741 | 'sources': [ |
| 742 | 'nix/xdg_util_unittest.cc', |
| 743 | ], |
| 744 | 'dependencies': [ |
| 745 | '../build/linux/system.gyp:gtk', |
| 746 | ] |
| 747 | }], |
| 748 | ], |
| 749 | 'dependencies': [ |
| 750 | '../build/linux/system.gyp:glib', |
| 751 | '../build/linux/system.gyp:ssl', |
| 752 | '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
| 753 | ], |
| 754 | }, { # use_glib!=1 |
| 755 | 'sources!': [ |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 756 | 'message_loop/message_pump_glib_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 757 | ] |
| 758 | }], |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 759 | ['use_ozone == 1', { |
| 760 | 'sources!': [ |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 761 | 'message_loop/message_pump_glib_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 762 | ] |
| 763 | }], |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 764 | ['OS == "linux" and linux_use_tcmalloc==1', { |
| 765 | 'dependencies': [ |
| 766 | 'allocator/allocator.gyp:allocator', |
| 767 | ], |
| 768 | }, |
| 769 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 770 | ['OS == "win"', { |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 771 | # This is needed to trigger the dll copy step on windows. |
| 772 | # TODO(mark): This should not be necessary. |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 773 | 'dependencies': [ |
| 774 | '../third_party/icu/icu.gyp:icudata', |
| 775 | ], |
| 776 | 'sources!': [ |
| 777 | 'file_descriptor_shuffle_unittest.cc', |
| 778 | 'files/dir_reader_posix_unittest.cc', |
| 779 | 'threading/worker_pool_posix_unittest.cc', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 780 | 'message_loop/message_pump_libevent_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 781 | ], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 782 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 783 | 'msvs_disabled_warnings': [ |
| 784 | 4267, |
| 785 | ], |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 786 | # This is needed so base_unittests uses the allocator shim, as |
| 787 | # SecurityTest.MemoryAllocationRestriction* tests are dependent |
| 788 | # on tcmalloc. |
| 789 | # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into |
| 790 | # their own test suite. |
| 791 | 'conditions': [ |
| 792 | ['win_use_allocator_shim==1', { |
| 793 | 'dependencies': [ |
| 794 | 'allocator/allocator.gyp:allocator', |
| 795 | ], |
| 796 | }], |
| 797 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 798 | }, { # OS != "win" |
| 799 | 'dependencies': [ |
| 800 | '../third_party/libevent/libevent.gyp:libevent' |
| 801 | ], |
| 802 | 'sources/': [ |
| 803 | ['exclude', '^win/'], |
| 804 | ], |
| 805 | 'sources!': [ |
| 806 | 'debug/trace_event_win_unittest.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 807 | 'time/time_win_unittest.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 808 | 'win/win_util_unittest.cc', |
| 809 | ], |
| 810 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 811 | ['use_system_nspr==1', { |
| 812 | 'dependencies': [ |
| 813 | 'third_party/nspr/nspr.gyp:nspr', |
| 814 | ], |
| 815 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 816 | ], # conditions |
| 817 | 'target_conditions': [ |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 818 | ['OS == "ios" and _toolset != "host"', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 819 | 'sources/': [ |
| 820 | # Pull in specific Mac files for iOS (which have been filtered out |
| 821 | # by file name rules). |
| 822 | ['include', '^mac/objc_property_releaser_unittest\\.mm$'], |
| 823 | ['include', '^mac/bind_objc_block_unittest\\.mm$'], |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 824 | ['include', '^mac/scoped_nsobject_unittest\\.mm$'], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 825 | ['include', '^sys_string_conversions_mac_unittest\\.mm$'], |
| 826 | ], |
| 827 | }], |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 828 | ['OS == "android"', { |
| 829 | 'sources/': [ |
| 830 | ['include', '^debug/proc_maps_linux_unittest\\.cc$'], |
| 831 | ], |
| 832 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 833 | ], # target_conditions |
| 834 | }, |
| 835 | { |
| 836 | 'target_name': 'test_support_base', |
| 837 | 'type': 'static_library', |
| 838 | 'dependencies': [ |
| 839 | 'base', |
| 840 | 'base_static', |
| 841 | 'base_i18n', |
| 842 | '../testing/gmock.gyp:gmock', |
| 843 | '../testing/gtest.gyp:gtest', |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 844 | '../third_party/libxml/libxml.gyp:libxml', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 845 | 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 846 | ], |
| 847 | 'export_dependent_settings': [ |
| 848 | 'base', |
| 849 | ], |
| 850 | 'conditions': [ |
| 851 | ['toolkit_uses_gtk==1', { |
| 852 | 'dependencies': [ |
| 853 | # test_suite initializes GTK. |
| 854 | '../build/linux/system.gyp:gtk', |
| 855 | ], |
| 856 | }], |
| 857 | ['os_posix==0', { |
| 858 | 'sources!': [ |
| 859 | 'test/scoped_locale.cc', |
| 860 | 'test/scoped_locale.h', |
| 861 | ], |
| 862 | }], |
| 863 | ['os_bsd==1', { |
| 864 | 'sources!': [ |
| 865 | 'test/test_file_util_linux.cc', |
| 866 | ], |
| 867 | }], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 868 | ], |
| 869 | 'sources': [ |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 870 | 'test/expectations/expectation.cc', |
| 871 | 'test/expectations/expectation.h', |
| 872 | 'test/expectations/parser.cc', |
| 873 | 'test/expectations/parser.h', |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 874 | 'test/gtest_xml_util.cc', |
| 875 | 'test/gtest_xml_util.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 876 | 'test/mock_chrome_application_mac.h', |
| 877 | 'test/mock_chrome_application_mac.mm', |
| 878 | 'test/mock_devices_changed_observer.cc', |
| 879 | 'test/mock_devices_changed_observer.h', |
| 880 | 'test/mock_time_provider.cc', |
| 881 | 'test/mock_time_provider.h', |
| 882 | 'test/multiprocess_test.cc', |
| 883 | 'test/multiprocess_test.h', |
| 884 | 'test/multiprocess_test_android.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 885 | 'test/null_task_runner.cc', |
| 886 | 'test/null_task_runner.h', |
Torne (Richard Coles) | 58537e2 | 2013-09-12 12:10:22 +0100 | [diff] [blame^] | 887 | 'test/parallel_test_launcher.cc', |
| 888 | 'test/parallel_test_launcher.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 889 | 'test/perf_test_suite.cc', |
| 890 | 'test/perf_test_suite.h', |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 891 | 'test/perftimer.cc', |
Ben Murdoch | ba5b9a6 | 2013-08-12 14:20:17 +0100 | [diff] [blame] | 892 | 'test/power_monitor_test_base.cc', |
| 893 | 'test/power_monitor_test_base.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 894 | 'test/scoped_locale.cc', |
| 895 | 'test/scoped_locale.h', |
| 896 | 'test/scoped_path_override.cc', |
| 897 | 'test/scoped_path_override.h', |
| 898 | 'test/sequenced_task_runner_test_template.cc', |
| 899 | 'test/sequenced_task_runner_test_template.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 900 | 'test/sequenced_worker_pool_owner.cc', |
| 901 | 'test/sequenced_worker_pool_owner.h', |
| 902 | 'test/simple_test_clock.cc', |
| 903 | 'test/simple_test_clock.h', |
| 904 | 'test/simple_test_tick_clock.cc', |
| 905 | 'test/simple_test_tick_clock.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 906 | 'test/task_runner_test_template.cc', |
| 907 | 'test/task_runner_test_template.h', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 908 | 'test/test_file_util.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 909 | 'test/test_file_util.h', |
| 910 | 'test/test_file_util_linux.cc', |
| 911 | 'test/test_file_util_mac.cc', |
| 912 | 'test/test_file_util_posix.cc', |
| 913 | 'test/test_file_util_win.cc', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 914 | 'test/test_launcher.cc', |
| 915 | 'test/test_launcher.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 916 | 'test/test_listener_ios.h', |
| 917 | 'test/test_listener_ios.mm', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 918 | 'test/test_pending_task.cc', |
| 919 | 'test/test_pending_task.h', |
| 920 | 'test/test_process_killer_win.cc', |
| 921 | 'test/test_process_killer_win.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 922 | 'test/test_reg_util_win.cc', |
| 923 | 'test/test_reg_util_win.h', |
| 924 | 'test/test_shortcut_win.cc', |
| 925 | 'test/test_shortcut_win.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 926 | 'test/test_simple_task_runner.cc', |
| 927 | 'test/test_simple_task_runner.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 928 | 'test/test_suite.cc', |
| 929 | 'test/test_suite.h', |
| 930 | 'test/test_support_android.cc', |
| 931 | 'test/test_support_android.h', |
| 932 | 'test/test_support_ios.h', |
| 933 | 'test/test_support_ios.mm', |
| 934 | 'test/test_switches.cc', |
| 935 | 'test/test_switches.h', |
| 936 | 'test/test_timeouts.cc', |
| 937 | 'test/test_timeouts.h', |
| 938 | 'test/thread_test_helper.cc', |
| 939 | 'test/thread_test_helper.h', |
| 940 | 'test/trace_event_analyzer.cc', |
| 941 | 'test/trace_event_analyzer.h', |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 942 | 'test/unit_test_launcher.cc', |
| 943 | 'test/unit_test_launcher.h', |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 944 | 'test/unit_test_launcher_ios.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 945 | 'test/values_test_util.cc', |
| 946 | 'test/values_test_util.h', |
| 947 | ], |
| 948 | 'target_conditions': [ |
| 949 | ['OS == "ios"', { |
| 950 | 'sources/': [ |
| 951 | # Pull in specific Mac files for iOS (which have been filtered out |
| 952 | # by file name rules). |
| 953 | ['include', '^test/test_file_util_mac\\.cc$'], |
| 954 | ], |
Torne (Richard Coles) | 3551c9c | 2013-08-23 16:39:15 +0100 | [diff] [blame] | 955 | 'sources!': [ |
| 956 | # iOS uses its own unit test launcher. |
| 957 | 'test/unit_test_launcher.cc', |
| 958 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 959 | }], |
| 960 | ], # target_conditions |
| 961 | }, |
| 962 | { |
| 963 | 'target_name': 'test_support_perf', |
| 964 | 'type': 'static_library', |
| 965 | 'dependencies': [ |
| 966 | 'base', |
| 967 | '../testing/gtest.gyp:gtest', |
| 968 | ], |
| 969 | 'sources': [ |
Torne (Richard Coles) | 424c4d7 | 2013-08-30 15:14:49 +0100 | [diff] [blame] | 970 | 'test/perftimer.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 971 | 'test/run_all_perftests.cc', |
| 972 | ], |
| 973 | 'direct_dependent_settings': { |
| 974 | 'defines': [ |
| 975 | 'PERF_TEST', |
| 976 | ], |
| 977 | }, |
| 978 | 'conditions': [ |
| 979 | ['toolkit_uses_gtk==1', { |
| 980 | 'dependencies': [ |
| 981 | # Needed to handle the #include chain: |
| 982 | # base/test/perf_test_suite.h |
| 983 | # base/test/test_suite.h |
| 984 | # gtk/gtk.h |
| 985 | '../build/linux/system.gyp:gtk', |
| 986 | ], |
| 987 | }], |
| 988 | ], |
| 989 | }, |
| 990 | ], |
| 991 | 'conditions': [ |
| 992 | ['OS!="ios"', { |
| 993 | 'targets': [ |
| 994 | { |
| 995 | 'target_name': 'check_example', |
| 996 | 'type': 'executable', |
| 997 | 'sources': [ |
| 998 | 'check_example.cc', |
| 999 | ], |
| 1000 | 'dependencies': [ |
| 1001 | 'base', |
| 1002 | ], |
| 1003 | }, |
| 1004 | ], |
| 1005 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1006 | ['OS == "win" and target_arch=="ia32"', { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1007 | 'targets': [ |
| 1008 | { |
| 1009 | 'target_name': 'base_nacl_win64', |
| 1010 | 'type': '<(component)', |
| 1011 | 'variables': { |
| 1012 | 'base_target': 1, |
| 1013 | }, |
| 1014 | 'dependencies': [ |
| 1015 | 'base_static_win64', |
| 1016 | 'allocator/allocator.gyp:allocator_extension_thunks_win64', |
| 1017 | 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', |
| 1018 | ], |
| 1019 | # TODO(gregoryd): direct_dependent_settings should be shared with the |
| 1020 | # 32-bit target, but it doesn't work due to a bug in gyp |
| 1021 | 'direct_dependent_settings': { |
| 1022 | 'include_dirs': [ |
| 1023 | '..', |
| 1024 | ], |
| 1025 | }, |
| 1026 | 'defines': [ |
| 1027 | '<@(nacl_win64_defines)', |
| 1028 | ], |
| 1029 | 'sources!': [ |
| 1030 | # base64.cc depends on modp_b64. |
| 1031 | 'base64.cc', |
| 1032 | ], |
| 1033 | 'configurations': { |
| 1034 | 'Common_Base': { |
| 1035 | 'msvs_target_platform': 'x64', |
| 1036 | }, |
| 1037 | }, |
| 1038 | 'conditions': [ |
| 1039 | ['component == "shared_library"', { |
| 1040 | 'sources!': [ |
| 1041 | 'debug/debug_on_start_win.cc', |
| 1042 | ], |
| 1043 | }], |
| 1044 | ], |
| 1045 | }, |
| 1046 | { |
| 1047 | 'target_name': 'base_i18n_nacl_win64', |
| 1048 | 'type': '<(component)', |
| 1049 | # TODO(gregoryd): direct_dependent_settings should be shared with the |
| 1050 | # 32-bit target, but it doesn't work due to a bug in gyp |
| 1051 | 'direct_dependent_settings': { |
| 1052 | 'include_dirs': [ |
| 1053 | '..', |
| 1054 | ], |
| 1055 | }, |
| 1056 | 'defines': [ |
| 1057 | '<@(nacl_win64_defines)', |
| 1058 | 'BASE_I18N_IMPLEMENTATION', |
| 1059 | ], |
| 1060 | 'include_dirs': [ |
| 1061 | '..', |
| 1062 | ], |
| 1063 | 'sources': [ |
| 1064 | 'i18n/icu_util_nacl_win64.cc', |
| 1065 | ], |
| 1066 | 'configurations': { |
| 1067 | 'Common_Base': { |
| 1068 | 'msvs_target_platform': 'x64', |
| 1069 | }, |
| 1070 | }, |
| 1071 | }, |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1072 | { |
| 1073 | # TODO(rvargas): Remove this when gyp finally supports a clean model. |
| 1074 | # See bug 36232. |
| 1075 | 'target_name': 'base_static_win64', |
| 1076 | 'type': 'static_library', |
| 1077 | 'sources': [ |
| 1078 | 'base_switches.cc', |
| 1079 | 'base_switches.h', |
| 1080 | 'win/pe_image.cc', |
| 1081 | 'win/pe_image.h', |
| 1082 | ], |
| 1083 | 'sources!': [ |
| 1084 | # base64.cc depends on modp_b64. |
| 1085 | 'base64.cc', |
| 1086 | ], |
| 1087 | 'include_dirs': [ |
| 1088 | '..', |
| 1089 | ], |
| 1090 | 'configurations': { |
| 1091 | 'Common_Base': { |
| 1092 | 'msvs_target_platform': 'x64', |
| 1093 | }, |
| 1094 | }, |
| 1095 | 'defines': [ |
| 1096 | 'NACL_WIN64', |
| 1097 | ], |
| 1098 | # TODO(rvargas): Bug 78117. Remove this. |
| 1099 | 'msvs_disabled_warnings': [ |
| 1100 | 4244, |
| 1101 | ], |
| 1102 | }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1103 | ], |
| 1104 | }], |
| 1105 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
| 1106 | 'targets': [ |
| 1107 | { |
| 1108 | 'target_name': 'symbolize', |
| 1109 | 'type': 'static_library', |
| 1110 | 'toolsets': ['host', 'target'], |
| 1111 | 'variables': { |
| 1112 | 'chromium_code': 0, |
| 1113 | }, |
| 1114 | 'conditions': [ |
| 1115 | ['OS == "solaris"', { |
| 1116 | 'include_dirs': [ |
| 1117 | '/usr/gnu/include', |
| 1118 | '/usr/gnu/include/libelf', |
| 1119 | ], |
| 1120 | },], |
| 1121 | ], |
| 1122 | 'cflags': [ |
| 1123 | '-Wno-sign-compare', |
| 1124 | ], |
| 1125 | 'cflags!': [ |
| 1126 | '-Wextra', |
| 1127 | ], |
| 1128 | 'sources': [ |
| 1129 | 'third_party/symbolize/config.h', |
| 1130 | 'third_party/symbolize/demangle.cc', |
| 1131 | 'third_party/symbolize/demangle.h', |
| 1132 | 'third_party/symbolize/glog/logging.h', |
| 1133 | 'third_party/symbolize/glog/raw_logging.h', |
| 1134 | 'third_party/symbolize/symbolize.cc', |
| 1135 | 'third_party/symbolize/symbolize.h', |
| 1136 | 'third_party/symbolize/utilities.h', |
| 1137 | ], |
| 1138 | 'include_dirs': [ |
| 1139 | '..', |
| 1140 | ], |
| 1141 | }, |
| 1142 | { |
| 1143 | 'target_name': 'xdg_mime', |
| 1144 | 'type': 'static_library', |
| 1145 | 'toolsets': ['host', 'target'], |
| 1146 | 'variables': { |
| 1147 | 'chromium_code': 0, |
| 1148 | }, |
| 1149 | 'cflags!': [ |
| 1150 | '-Wextra', |
| 1151 | ], |
| 1152 | 'sources': [ |
| 1153 | 'third_party/xdg_mime/xdgmime.c', |
| 1154 | 'third_party/xdg_mime/xdgmime.h', |
| 1155 | 'third_party/xdg_mime/xdgmimealias.c', |
| 1156 | 'third_party/xdg_mime/xdgmimealias.h', |
| 1157 | 'third_party/xdg_mime/xdgmimecache.c', |
| 1158 | 'third_party/xdg_mime/xdgmimecache.h', |
| 1159 | 'third_party/xdg_mime/xdgmimeglob.c', |
| 1160 | 'third_party/xdg_mime/xdgmimeglob.h', |
| 1161 | 'third_party/xdg_mime/xdgmimeicon.c', |
| 1162 | 'third_party/xdg_mime/xdgmimeicon.h', |
| 1163 | 'third_party/xdg_mime/xdgmimeint.c', |
| 1164 | 'third_party/xdg_mime/xdgmimeint.h', |
| 1165 | 'third_party/xdg_mime/xdgmimemagic.c', |
| 1166 | 'third_party/xdg_mime/xdgmimemagic.h', |
| 1167 | 'third_party/xdg_mime/xdgmimeparent.c', |
| 1168 | 'third_party/xdg_mime/xdgmimeparent.h', |
| 1169 | ], |
| 1170 | }, |
| 1171 | ], |
| 1172 | }], |
| 1173 | ['OS == "android"', { |
| 1174 | 'targets': [ |
| 1175 | { |
| 1176 | 'target_name': 'base_jni_headers', |
| 1177 | 'type': 'none', |
| 1178 | 'sources': [ |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 1179 | 'android/java/src/org/chromium/base/ActivityStatus.java', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1180 | 'android/java/src/org/chromium/base/BuildInfo.java', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1181 | 'android/java/src/org/chromium/base/CpuFeatures.java', |
| 1182 | 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 1183 | 'android/java/src/org/chromium/base/MemoryPressureListener.java', |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame] | 1184 | 'android/java/src/org/chromium/base/JavaHandlerThread.java', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1185 | 'android/java/src/org/chromium/base/PathService.java', |
| 1186 | 'android/java/src/org/chromium/base/PathUtils.java', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 1187 | 'android/java/src/org/chromium/base/PowerMonitor.java', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1188 | 'android/java/src/org/chromium/base/SystemMessageHandler.java', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 1189 | 'android/java/src/org/chromium/base/SysUtils.java', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1190 | 'android/java/src/org/chromium/base/ThreadUtils.java', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1191 | ], |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 1192 | 'conditions': [ |
| 1193 | ['google_tv==1', { |
| 1194 | 'sources': [ |
| 1195 | 'android/java/src/org/chromium/base/ContextTypes.java', |
| 1196 | ], |
| 1197 | }], |
| 1198 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1199 | 'variables': { |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1200 | 'jni_gen_package': 'base', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1201 | }, |
| 1202 | 'includes': [ '../build/jni_generator.gypi' ], |
| 1203 | }, |
| 1204 | { |
| 1205 | 'target_name': 'base_java', |
| 1206 | 'type': 'none', |
| 1207 | 'variables': { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1208 | 'java_in_dir': '../base/android/java', |
| 1209 | }, |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 1210 | 'dependencies': [ |
| 1211 | 'base_java_activity_state', |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 1212 | 'base_java_memory_pressure_level_list', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 1213 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1214 | 'includes': [ '../build/java.gypi' ], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1215 | 'conditions': [ |
| 1216 | ['android_webview_build==0', { |
| 1217 | 'dependencies': [ |
| 1218 | '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib', |
| 1219 | ], |
| 1220 | }] |
| 1221 | ], |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1222 | }, |
| 1223 | { |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 1224 | 'target_name': 'base_java_activity_state', |
| 1225 | 'type': 'none', |
| 1226 | # This target is used to auto-generate ActivityState.java |
| 1227 | # from a template file. The source file contains a list of |
| 1228 | # Java constant declarations matching the ones in |
| 1229 | # android/activity_state_list.h. |
| 1230 | 'sources': [ |
| 1231 | 'android/java/src/org/chromium/base/ActivityState.template', |
| 1232 | ], |
| 1233 | 'variables': { |
| 1234 | 'package_name': 'org/chromium/base', |
| 1235 | 'template_deps': ['android/activity_state_list.h'], |
| 1236 | }, |
| 1237 | 'includes': [ '../build/android/java_cpp_template.gypi' ], |
| 1238 | }, |
| 1239 | { |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 1240 | 'target_name': 'base_java_memory_pressure_level_list', |
| 1241 | 'type': 'none', |
| 1242 | 'sources': [ |
| 1243 | 'android/java/src/org/chromium/base/MemoryPressureLevelList.template', |
| 1244 | ], |
| 1245 | 'variables': { |
| 1246 | 'package_name': 'org/chromium/base', |
| 1247 | 'template_deps': ['memory/memory_pressure_level_list.h'], |
| 1248 | }, |
| 1249 | 'includes': [ '../build/android/java_cpp_template.gypi' ], |
| 1250 | }, |
| 1251 | { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1252 | 'target_name': 'base_java_test_support', |
| 1253 | 'type': 'none', |
| 1254 | 'dependencies': [ |
| 1255 | 'base_java', |
| 1256 | ], |
| 1257 | 'variables': { |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1258 | 'java_in_dir': '../base/test/android/javatests', |
| 1259 | }, |
| 1260 | 'includes': [ '../build/java.gypi' ], |
| 1261 | }, |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 1262 | { |
| 1263 | 'target_name': 'base_javatests', |
| 1264 | 'type': 'none', |
| 1265 | 'dependencies': [ |
| 1266 | 'base_java', |
| 1267 | 'base_java_test_support', |
| 1268 | ], |
| 1269 | 'variables': { |
| 1270 | 'java_in_dir': '../base/android/javatests', |
| 1271 | }, |
| 1272 | 'includes': [ '../build/java.gypi' ], |
| 1273 | }, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 1274 | ], |
| 1275 | }], |
| 1276 | ['OS == "win"', { |
| 1277 | 'targets': [ |
| 1278 | { |
| 1279 | 'target_name': 'debug_message', |
| 1280 | 'type': 'executable', |
| 1281 | 'sources': [ |
| 1282 | 'debug_message.cc', |
| 1283 | ], |
| 1284 | 'msvs_settings': { |
| 1285 | 'VCLinkerTool': { |
| 1286 | 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 1287 | }, |
| 1288 | }, |
| 1289 | }, |
| 1290 | ], |
| 1291 | }], |
| 1292 | # Special target to wrap a gtest_target_type == shared_library |
| 1293 | # base_unittests into an android apk for execution. |
| 1294 | # TODO(jrg): lib.target comes from _InstallableTargetInstallPath() |
| 1295 | # in the gyp make generator. What is the correct way to extract |
| 1296 | # this path from gyp and into 'raw' for input to antfiles? |
| 1297 | # Hard-coding in the gypfile seems a poor choice. |
| 1298 | ['OS == "android" and gtest_target_type == "shared_library"', { |
| 1299 | 'targets': [ |
| 1300 | { |
| 1301 | 'target_name': 'base_unittests_apk', |
| 1302 | 'type': 'none', |
| 1303 | 'dependencies': [ |
| 1304 | 'base_java', |
| 1305 | 'base_unittests', |
| 1306 | ], |
| 1307 | 'variables': { |
| 1308 | 'test_suite_name': 'base_unittests', |
| 1309 | 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)', |
| 1310 | }, |
| 1311 | 'includes': [ '../build/apk_test.gypi' ], |
| 1312 | }, |
| 1313 | ], |
| 1314 | }], |
| 1315 | ['test_isolation_mode != "noop"', { |
| 1316 | 'targets': [ |
| 1317 | { |
| 1318 | 'target_name': 'base_unittests_run', |
| 1319 | 'type': 'none', |
| 1320 | 'dependencies': [ |
| 1321 | 'base_unittests', |
| 1322 | ], |
| 1323 | 'includes': [ |
| 1324 | '../build/isolate.gypi', |
| 1325 | 'base_unittests.isolate', |
| 1326 | ], |
| 1327 | 'sources': [ |
| 1328 | 'base_unittests.isolate', |
| 1329 | ], |
| 1330 | }, |
| 1331 | ], |
| 1332 | }], |
| 1333 | ], |
| 1334 | } |