| OLD | NEW | 
|---|
|  | (Empty) | 
| 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   'includes': [ |  | 
| 7     'gtest.gypi', |  | 
| 8   ], |  | 
| 9   'targets': [ |  | 
| 10     { |  | 
| 11       'target_name': 'gtest', |  | 
| 12       'toolsets': ['host', 'target'], |  | 
| 13       'type': 'static_library', |  | 
| 14       'sources': [ |  | 
| 15         '<@(gtest_sources)', |  | 
| 16       ], |  | 
| 17       'include_dirs': [ |  | 
| 18         'gtest', |  | 
| 19         'gtest/include', |  | 
| 20       ], |  | 
| 21       'dependencies': [ |  | 
| 22         'gtest_prod', |  | 
| 23       ], |  | 
| 24       'defines': [ |  | 
| 25         # In order to allow regex matches in gtest to be shared between Windows |  | 
| 26         # and other systems, we tell gtest to always use it's internal engine. |  | 
| 27         'GTEST_HAS_POSIX_RE=0', |  | 
| 28       ], |  | 
| 29       'all_dependent_settings': { |  | 
| 30         'include_dirs': [ |  | 
| 31           'gtest/include', |  | 
| 32         ], |  | 
| 33         'defines': [ |  | 
| 34           'GTEST_HAS_POSIX_RE=0', |  | 
| 35           'GTEST_LANG_CXX11=1', |  | 
| 36         ], |  | 
| 37       }, |  | 
| 38       'conditions': [ |  | 
| 39         ['OS == "mac" or OS == "ios"', { |  | 
| 40           'sources': [ |  | 
| 41             'gtest_mac.h', |  | 
| 42             'gtest_mac.mm', |  | 
| 43             'platform_test_mac.mm', |  | 
| 44           ], |  | 
| 45           'link_settings': { |  | 
| 46             'libraries': [ |  | 
| 47               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |  | 
| 48             ], |  | 
| 49           }, |  | 
| 50         }], |  | 
| 51         ['OS == "ios"', { |  | 
| 52           'dependencies' : [ |  | 
| 53             '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host', |  | 
| 54           ], |  | 
| 55           'direct_dependent_settings': { |  | 
| 56             'target_conditions': [ |  | 
| 57               # Turn all tests into bundles on iOS because that's the only |  | 
| 58               # type of executable supported for iOS. |  | 
| 59               ['_type=="executable"', { |  | 
| 60                 'variables': { |  | 
| 61                   # Use a variable so the path gets fixed up so it is always |  | 
| 62                   # correct when INFOPLIST_FILE finally gets set. |  | 
| 63                   'ios_unittest_info_plist_path': |  | 
| 64                     '<(DEPTH)/testing/gtest_ios/unittest-Info.plist', |  | 
| 65                 }, |  | 
| 66                 'mac_bundle': 1, |  | 
| 67                 'xcode_settings': { |  | 
| 68                   'BUNDLE_ID_TEST_NAME': '>(_target_name)', |  | 
| 69                   'INFOPLIST_FILE': '>(ios_unittest_info_plist_path)', |  | 
| 70                 }, |  | 
| 71                 'mac_bundle_resources': [ |  | 
| 72                   '<(ios_unittest_info_plist_path)', |  | 
| 73                   '<(DEPTH)/testing/gtest_ios/Default.png', |  | 
| 74                 ], |  | 
| 75                 'mac_bundle_resources!': [ |  | 
| 76                   '<(ios_unittest_info_plist_path)', |  | 
| 77                 ], |  | 
| 78               }], |  | 
| 79             ], |  | 
| 80           }, |  | 
| 81           'sources': [ |  | 
| 82             'coverage_util_ios.cc', |  | 
| 83             'coverage_util_ios.h', |  | 
| 84           ], |  | 
| 85         }], |  | 
| 86         ['OS=="ios" and asan==1', { |  | 
| 87           'direct_dependent_settings': { |  | 
| 88             'target_conditions': [ |  | 
| 89               # Package the ASan runtime dylib into the test app bundles. |  | 
| 90               ['_type=="executable"', { |  | 
| 91                 'postbuilds': [ |  | 
| 92                   { |  | 
| 93                     'variables': { |  | 
| 94                       # Define copy_asan_dylib_path in a variable ending in |  | 
| 95                       # _path so that gyp understands it's a path and |  | 
| 96                       # performs proper relativization during dict merging. |  | 
| 97                       'copy_asan_dylib_path': |  | 
| 98                         '<(DEPTH)/build/mac/copy_asan_runtime_dylib.sh', |  | 
| 99                     }, |  | 
| 100                     'postbuild_name': 'Copy ASan runtime dylib', |  | 
| 101                     'action': [ |  | 
| 102                       '>(copy_asan_dylib_path)', |  | 
| 103                     ], |  | 
| 104                   }, |  | 
| 105                 ], |  | 
| 106               }], |  | 
| 107             ], |  | 
| 108           }, |  | 
| 109         }], |  | 
| 110         ['OS=="android" and android_app_abi=="x86"', { |  | 
| 111           'defines': [ |  | 
| 112             'GTEST_HAS_CLONE=0', |  | 
| 113           ], |  | 
| 114           'direct_dependent_settings': { |  | 
| 115             'defines': [ |  | 
| 116               'GTEST_HAS_CLONE=0', |  | 
| 117             ], |  | 
| 118           }, |  | 
| 119         }], |  | 
| 120       ], |  | 
| 121       'direct_dependent_settings': { |  | 
| 122         'defines': [ |  | 
| 123           'UNIT_TEST', |  | 
| 124         ], |  | 
| 125         'target_conditions': [ |  | 
| 126           ['_type=="executable"', { |  | 
| 127             'test': 1, |  | 
| 128             'conditions': [ |  | 
| 129               ['OS=="mac"', { |  | 
| 130                 'run_as': { |  | 
| 131                   'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], |  | 
| 132                 }, |  | 
| 133               }], |  | 
| 134               ['OS=="ios"', { |  | 
| 135                 'variables': { |  | 
| 136                   # Use a variable so the path gets fixed up so it is always |  | 
| 137                   # correct when the action finally gets used. |  | 
| 138                   'ios_run_unittest_script_path': |  | 
| 139                     '<(DEPTH)/testing/gtest_ios/run-unittest.sh', |  | 
| 140                 }, |  | 
| 141                 'run_as': { |  | 
| 142                   'action????': ['>(ios_run_unittest_script_path)'], |  | 
| 143                 }, |  | 
| 144               }], |  | 
| 145               ['OS=="win"', { |  | 
| 146                 'run_as': { |  | 
| 147                   'action????': ['$(TargetPath)', '--gtest_print_time'], |  | 
| 148                 }, |  | 
| 149               }], |  | 
| 150             ], |  | 
| 151           }], |  | 
| 152         ], |  | 
| 153         'msvs_disabled_warnings': [4800], |  | 
| 154       }, |  | 
| 155     }, |  | 
| 156     { |  | 
| 157       'target_name': 'gtest_main', |  | 
| 158       'type': 'static_library', |  | 
| 159       'dependencies': [ |  | 
| 160         'gtest', |  | 
| 161       ], |  | 
| 162       'sources': [ |  | 
| 163         'gtest/src/gtest_main.cc', |  | 
| 164       ], |  | 
| 165     }, |  | 
| 166     { |  | 
| 167       'target_name': 'gtest_prod', |  | 
| 168       'toolsets': ['host', 'target'], |  | 
| 169       'type': 'none', |  | 
| 170       'sources': [ |  | 
| 171         'gtest/include/gtest/gtest_prod.h', |  | 
| 172       ], |  | 
| 173     }, |  | 
| 174   ], |  | 
| 175 } |  | 
| OLD | NEW | 
|---|