ipc.gyp revision 0529e5d033099cbfc42635f6f6183833b09dff6e
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 'ipc.gypi', 11 ], 12 'targets': [ 13 { 14 'target_name': 'ipc', 15 'type': '<(component)', 16 'variables': { 17 'ipc_target': 1, 18 }, 19 'dependencies': [ 20 '../base/base.gyp:base', 21 # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect. 22 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 23 ], 24 # TODO(gregoryd): direct_dependent_settings should be shared with the 25 # 64-bit target, but it doesn't work due to a bug in gyp 26 'direct_dependent_settings': { 27 'include_dirs': [ 28 '..', 29 ], 30 }, 31 }, 32 { 33 'target_name': 'ipc_tests', 34 'type': '<(gtest_target_type)', 35 'dependencies': [ 36 'ipc', 37 'test_support_ipc', 38 '../base/base.gyp:base', 39 '../base/base.gyp:base_i18n', 40 '../base/base.gyp:test_support_base', 41 '../testing/gtest.gyp:gtest', 42 ], 43 'include_dirs': [ 44 '..' 45 ], 46 'sources': [ 47 'file_descriptor_set_posix_unittest.cc', 48 'ipc_channel_posix_unittest.cc', 49 'ipc_channel_proxy_unittest.cc', 50 'ipc_channel_unittest.cc', 51 'ipc_fuzzing_tests.cc', 52 'ipc_message_unittest.cc', 53 'ipc_message_utils_unittest.cc', 54 'ipc_send_fds_test.cc', 55 'ipc_sync_channel_unittest.cc', 56 'ipc_sync_message_unittest.cc', 57 'ipc_sync_message_unittest.h', 58 'ipc_test_base.cc', 59 'ipc_test_base.h', 60 'run_all_unittests.cc', 61 'sync_socket_unittest.cc', 62 'unix_domain_socket_util_unittest.cc', 63 ], 64 'conditions': [ 65 ['OS == "win" or OS == "ios"', { 66 'sources!': [ 67 'unix_domain_socket_util_unittest.cc', 68 ], 69 }], 70 ['OS == "android" and gtest_target_type == "shared_library"', { 71 'dependencies': [ 72 '../testing/android/native_test.gyp:native_test_native_code', 73 ], 74 }], 75 ['os_posix == 1 and OS != "mac" and OS != "android"', { 76 'conditions': [ 77 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554 78 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', { 79 'dependencies': [ 80 '../base/allocator/allocator.gyp:allocator', 81 ], 82 }], 83 ], 84 }] 85 ], 86 }, 87 { 88 'target_name': 'ipc_perftests', 89 'type': '<(gtest_target_type)', 90 # TODO(viettrungluu): Figure out which dependencies are really needed. 91 'dependencies': [ 92 'ipc', 93 'test_support_ipc', 94 '../base/base.gyp:base', 95 '../base/base.gyp:base_i18n', 96 '../base/base.gyp:test_support_base', 97 '../base/base.gyp:test_support_perf', 98 '../testing/gtest.gyp:gtest', 99 ], 100 'include_dirs': [ 101 '..' 102 ], 103 'sources': [ 104 'ipc_perftests.cc', 105 'ipc_test_base.cc', 106 'ipc_test_base.h', 107 ], 108 'conditions': [ 109 ['OS == "android" and gtest_target_type == "shared_library"', { 110 'dependencies': [ 111 '../testing/android/native_test.gyp:native_test_native_code', 112 ], 113 }], 114 ['os_posix == 1 and OS != "mac" and OS != "android"', { 115 'conditions': [ 116 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554 117 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', { 118 'dependencies': [ 119 '../base/allocator/allocator.gyp:allocator', 120 ], 121 }], 122 ], 123 }] 124 ], 125 }, 126 { 127 'target_name': 'test_support_ipc', 128 'type': 'static_library', 129 'dependencies': [ 130 'ipc', 131 '../base/base.gyp:base', 132 '../testing/gtest.gyp:gtest', 133 ], 134 'sources': [ 135 'ipc_multiprocess_test.cc', 136 'ipc_multiprocess_test.h', 137 'ipc_test_sink.cc', 138 'ipc_test_sink.h', 139 ], 140 }, 141 ], 142 'conditions': [ 143 ['OS=="win" and target_arch=="ia32"', { 144 'targets': [ 145 { 146 'target_name': 'ipc_win64', 147 'type': '<(component)', 148 'variables': { 149 'ipc_target': 1, 150 }, 151 'dependencies': [ 152 '../base/base.gyp:base_win64', 153 # TODO(viettrungluu): Needed for base/lazy_instance.h, which is 154 # suspect. 155 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', 156 ], 157 # TODO(gregoryd): direct_dependent_settings should be shared with the 158 # 32-bit target, but it doesn't work due to a bug in gyp 159 'direct_dependent_settings': { 160 'include_dirs': [ 161 '..', 162 ], 163 }, 164 'configurations': { 165 'Common_Base': { 166 'msvs_target_platform': 'x64', 167 }, 168 }, 169 }, 170 ], 171 }], 172 # Special target to wrap a gtest_target_type==shared_library 173 # ipc_tests into an android apk for execution. 174 # See base.gyp for TODO(jrg)s about this strategy. 175 ['OS == "android" and gtest_target_type == "shared_library"', { 176 'targets': [ 177 { 178 'target_name': 'ipc_tests_apk', 179 'type': 'none', 180 'dependencies': [ 181 'ipc_tests', 182 ], 183 'variables': { 184 'test_suite_name': 'ipc_tests', 185 }, 186 'includes': [ '../build/apk_test.gypi' ], 187 }, 188 { 189 'target_name': 'ipc_perftests_apk', 190 'type': 'none', 191 'dependencies': [ 192 'ipc_perftests', 193 ], 194 'variables': { 195 'test_suite_name': 'ipc_perftests', 196 }, 197 'includes': [ '../build/apk_test.gypi' ], 198 }], 199 }], 200 ], 201} 202