Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'targets': [ | 6 'targets': [ |
| 7 { | 7 { |
| 8 'target_name': 'gtest', | 8 'target_name': 'gtest', |
| 9 'type': 'static_library', | 9 'type': 'static_library', |
| 10 'sources': [ | 10 'sources': [ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 'gtest/src/gtest-all.cc', # Not needed by our build. | 44 'gtest/src/gtest-all.cc', # Not needed by our build. |
| 45 ], | 45 ], |
| 46 'include_dirs': [ | 46 'include_dirs': [ |
| 47 'gtest', | 47 'gtest', |
| 48 'gtest/include', | 48 'gtest/include', |
| 49 ], | 49 ], |
| 50 'dependencies': [ | 50 'dependencies': [ |
| 51 'gtest_prod', | 51 'gtest_prod', |
| 52 ], | 52 ], |
| 53 'conditions': [ | 53 'conditions': [ |
| 54 ['OS == "mac"', { | 54 ['OS == "mac" or OS == "ios"', { |
| 55 'sources': [ | 55 'sources': [ |
| 56 'gtest_mac.h', | 56 'gtest_mac.h', |
| 57 'gtest_mac.mm', | 57 'gtest_mac.mm', |
| 58 'platform_test_mac.mm' | 58 'platform_test_mac.mm' |
| 59 ], | 59 ], |
| 60 'link_settings': { | 60 'link_settings': { |
| 61 'libraries': [ | 61 'libraries': [ |
| 62 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | 62 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 63 ], | 63 ], |
| 64 }, | 64 }, |
| 65 }], | 65 }], |
| 66 ['OS == "ios"', { | |
| 67 'direct_dependent_settings': { | |
| 68 'target_conditions': [ | |
| 69 # Turn all tests into bundles on iOS because that's the only | |
| 70 # type of executable supported for iOS. | |
| 71 ['_type=="executable"', { | |
| 72 'variables': { | |
| 73 # Use a variable so the path gets fixed up so it is always | |
| 74 # correct when INFOPLIST_FILE finally gets set. | |
| 75 'ios_unittest_info_plist_path': | |
| 76 '<(DEPTH)/testing/gtest_ios/unittest-Info.plist', | |
| 77 }, | |
| 78 'mac_bundle': 1, | |
| 79 'xcode_settings': { | |
| 80 'BUNDLE_ID_TEST_NAME': '>!(echo ">(_target_name)" | sed -e "s/ _//g")', | |
|
Mark Mentovai
2012/07/09 12:41:53
Break this off to a new line to avoid going past 8
stuartmorgan
2012/07/09 13:01:29
Done.
| |
| 81 'INFOPLIST_FILE': '>(ios_unittest_info_plist_path)', | |
| 82 }, | |
| 83 'mac_bundle_resources': [ | |
| 84 '<(ios_unittest_info_plist_path)', | |
| 85 ], | |
| 86 'mac_bundle_resources!': [ | |
| 87 '<(ios_unittest_info_plist_path)', | |
| 88 ], | |
| 89 }], | |
| 90 ], | |
| 91 }, | |
| 92 }], | |
| 66 ['os_posix == 1', { | 93 ['os_posix == 1', { |
| 67 'defines': [ | 94 'defines': [ |
| 68 # gtest isn't able to figure out when RTTI is disabled for gcc | 95 # gtest isn't able to figure out when RTTI is disabled for gcc |
| 69 # versions older than 4.3.2, and assumes it's enabled. Our Mac | 96 # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 70 # and Linux builds disable RTTI, and cannot guarantee that the | 97 # and Linux builds disable RTTI, and cannot guarantee that the |
| 71 # compiler will be 4.3.2. or newer. The Mac, for example, uses | 98 # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 72 # 4.2.1 as that is the latest available on that platform. gtest | 99 # 4.2.1 as that is the latest available on that platform. gtest |
| 73 # must be instructed that RTTI is disabled here, and for any | 100 # must be instructed that RTTI is disabled here, and for any |
| 74 # direct dependents that might include gtest headers. | 101 # direct dependents that might include gtest headers. |
| 75 'GTEST_HAS_RTTI=0', | 102 'GTEST_HAS_RTTI=0', |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 104 ], | 131 ], |
| 105 'target_conditions': [ | 132 'target_conditions': [ |
| 106 ['_type=="executable"', { | 133 ['_type=="executable"', { |
| 107 'test': 1, | 134 'test': 1, |
| 108 'conditions': [ | 135 'conditions': [ |
| 109 ['OS=="mac"', { | 136 ['OS=="mac"', { |
| 110 'run_as': { | 137 'run_as': { |
| 111 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], | 138 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], |
| 112 }, | 139 }, |
| 113 }], | 140 }], |
| 141 ['OS=="ios"', { | |
| 142 'variables': { | |
| 143 # Use a variable so the path gets fixed up so it is always | |
| 144 # correct when the action finally gets used. | |
| 145 'ios_run_unittest_script_path': | |
| 146 '<(DEPTH)/testing/gtest_ios/RunUnittest.sh', | |
| 147 }, | |
| 148 'run_as': { | |
| 149 'action????': ['>(ios_run_unittest_script_path)'], | |
| 150 }, | |
| 151 }], | |
| 114 ['OS=="win"', { | 152 ['OS=="win"', { |
| 115 'run_as': { | 153 'run_as': { |
| 116 'action????': ['$(TargetPath)', '--gtest_print_time'], | 154 'action????': ['$(TargetPath)', '--gtest_print_time'], |
| 117 }, | 155 }, |
| 118 }], | 156 }], |
| 119 ], | 157 ], |
| 120 }], | 158 }], |
| 121 ], | 159 ], |
| 122 'msvs_disabled_warnings': [4800], | 160 'msvs_disabled_warnings': [4800], |
| 123 }, | 161 }, |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 135 { | 173 { |
| 136 'target_name': 'gtest_prod', | 174 'target_name': 'gtest_prod', |
| 137 'toolsets': ['host', 'target'], | 175 'toolsets': ['host', 'target'], |
| 138 'type': 'none', | 176 'type': 'none', |
| 139 'sources': [ | 177 'sources': [ |
| 140 'gtest/include/gtest/gtest_prod.h', | 178 'gtest/include/gtest/gtest_prod.h', |
| 141 ], | 179 ], |
| 142 }, | 180 }, |
| 143 ], | 181 ], |
| 144 } | 182 } |
| OLD | NEW |