OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 'chromium_sources': 0, | 6 'chromium_sources': 0, |
7 'variables': { | 7 'targets': [ |
8 'ochamcrest_copy_dir': '<(SHARED_INTERMEDIATE_DIR)/ios/third_party/ochamcres
t', | 8 { |
9 'ochamcrest_sources': [ | 9 'target_name': 'OCHamcrest', |
| 10 'type': 'shared_library', |
| 11 'mac_bundle': 1, |
| 12 'sources': [ |
10 'src/Source/Core/HCAssertThat.h', | 13 'src/Source/Core/HCAssertThat.h', |
11 'src/Source/Core/HCAssertThat.m', | 14 'src/Source/Core/HCAssertThat.m', |
12 'src/Source/Core/HCBaseDescription.h', | 15 'src/Source/Core/HCBaseDescription.h', |
13 'src/Source/Core/HCBaseDescription.m', | 16 'src/Source/Core/HCBaseDescription.m', |
14 'src/Source/Core/HCBaseMatcher.h', | 17 'src/Source/Core/HCBaseMatcher.h', |
15 'src/Source/Core/HCBaseMatcher.m', | 18 'src/Source/Core/HCBaseMatcher.m', |
16 'src/Source/Core/HCDescription.h', | 19 'src/Source/Core/HCDescription.h', |
17 'src/Source/Core/HCDiagnosingMatcher.h', | 20 'src/Source/Core/HCDiagnosingMatcher.h', |
18 'src/Source/Core/HCDiagnosingMatcher.m', | 21 'src/Source/Core/HCDiagnosingMatcher.m', |
19 'src/Source/Core/HCMatcher.h', | 22 'src/Source/Core/HCMatcher.h', |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 'src/Source/Library/Text/HCStringContains.m', | 155 'src/Source/Library/Text/HCStringContains.m', |
153 'src/Source/Library/Text/HCStringContainsInOrder.h', | 156 'src/Source/Library/Text/HCStringContainsInOrder.h', |
154 'src/Source/Library/Text/HCStringContainsInOrder.m', | 157 'src/Source/Library/Text/HCStringContainsInOrder.m', |
155 'src/Source/Library/Text/HCStringEndsWith.h', | 158 'src/Source/Library/Text/HCStringEndsWith.h', |
156 'src/Source/Library/Text/HCStringEndsWith.m', | 159 'src/Source/Library/Text/HCStringEndsWith.m', |
157 'src/Source/Library/Text/HCStringStartsWith.h', | 160 'src/Source/Library/Text/HCStringStartsWith.h', |
158 'src/Source/Library/Text/HCStringStartsWith.m', | 161 'src/Source/Library/Text/HCStringStartsWith.m', |
159 'src/Source/Library/Text/HCSubstringMatcher.h', | 162 'src/Source/Library/Text/HCSubstringMatcher.h', |
160 'src/Source/Library/Text/HCSubstringMatcher.m', | 163 'src/Source/Library/Text/HCSubstringMatcher.m', |
161 'src/Source/OCHamcrest.h', | 164 'src/Source/OCHamcrest.h', |
162 ], | |
163 }, | |
164 'targets': [ | |
165 # OCHamcrest sources contains import rules using relative file names | |
166 # ("HCAssertThat.h") and other using paths in an installed framework | |
167 # (<OCHamcrest/HCMatcher.h>). In order to build, copy all the sources | |
168 # to <(SHARED_INTERMEDIATE_DIR)/ios/third_party/ochmacrest/OCHamcrest | |
169 # so that both type of import work (another option considered was to | |
170 # build forwarding headers but this required duplicating the list of | |
171 # files in GN build and was ruled out). | |
172 # | |
173 # To avoid ODR violation, direct import of ios/third_party/ochamcrest | |
174 # is forbidden in ios/DEPS and code should instead use import as if | |
175 # OCHamcrest was in a framework (i.e. #import <OCHamcrest/OCHamcrest.h>). | |
176 { | |
177 'target_name': 'ochamcrest_copy_sources', | |
178 'hard_dependency': 1, | |
179 'type': 'none', | |
180 'actions': [ | |
181 { | |
182 'action_name': 'copy_ochamcrest_sources', | |
183 'inputs': [ | |
184 '../../chrome/tools/build/ios_copy_files.py', | |
185 '<@(ochamcrest_sources)', | |
186 ], | |
187 'outputs': [ | |
188 '<!@pymod_do_main(ios_copy_files -o ' | |
189 '--dest-dir <(ochamcrest_copy_dir)/OCHamcrest ' | |
190 '<(ochamcrest_sources))', | |
191 ], | |
192 'action': [ | |
193 'python', | |
194 '../../chrome/tools/build/ios_copy_files.py', | |
195 '--dest-dir', | |
196 '<(ochamcrest_copy_dir)/OCHamcrest/', | |
197 '<@(ochamcrest_sources)', | |
198 ], | |
199 'message': 'Copying OCHamcrest sources files', | |
200 }, | |
201 ], | 165 ], |
202 }, | 166 'mac_framework_headers': [ |
203 { | 167 'src/Source/Core/HCAssertThat.h', |
204 'target_name': 'ochamcrest', | 168 'src/Source/Core/HCBaseDescription.h', |
205 'type': 'static_library', | 169 'src/Source/Core/HCBaseMatcher.h', |
206 'sources': [ | 170 'src/Source/Core/HCDescription.h', |
207 '<!@pymod_do_main(ios_copy_files -o ' | 171 'src/Source/Core/HCDiagnosingMatcher.h', |
208 '--dest-dir <(ochamcrest_copy_dir)/OCHamcrest ' | 172 'src/Source/Core/HCMatcher.h', |
209 '<(ochamcrest_sources))', | 173 'src/Source/Core/HCSelfDescribing.h', |
210 ], | 174 'src/Source/Core/HCStringDescription.h', |
211 'include_dirs': [ | 175 'src/Source/Core/Helpers/HCCollect.h', |
212 '<(ochamcrest_copy_dir)', | 176 'src/Source/Core/Helpers/HCInvocationMatcher.h', |
| 177 'src/Source/Core/Helpers/HCRequireNonNilObject.h', |
| 178 'src/Source/Core/Helpers/HCWrapInMatcher.h', |
| 179 'src/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h', |
| 180 'src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h', |
| 181 'src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain
.h', |
| 182 'src/Source/Library/Collection/HCEvery.h', |
| 183 'src/Source/Library/Collection/HCHasCount.h', |
| 184 'src/Source/Library/Collection/HCIsCollectionContaining.h', |
| 185 'src/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h', |
| 186 'src/Source/Library/Collection/HCIsCollectionContainingInOrder.h', |
| 187 'src/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h
', |
| 188 'src/Source/Library/Collection/HCIsCollectionOnlyContaining.h', |
| 189 'src/Source/Library/Collection/HCIsDictionaryContaining.h', |
| 190 'src/Source/Library/Collection/HCIsDictionaryContainingEntries.h', |
| 191 'src/Source/Library/Collection/HCIsDictionaryContainingKey.h', |
| 192 'src/Source/Library/Collection/HCIsDictionaryContainingValue.h', |
| 193 'src/Source/Library/Collection/HCIsEmptyCollection.h', |
| 194 'src/Source/Library/Collection/HCIsIn.h', |
| 195 'src/Source/Library/Decorator/HCDescribedAs.h', |
| 196 'src/Source/Library/Decorator/HCIs.h', |
| 197 'src/Source/Library/Logical/HCAllOf.h', |
| 198 'src/Source/Library/Logical/HCAnyOf.h', |
| 199 'src/Source/Library/Logical/HCIsAnything.h', |
| 200 'src/Source/Library/Logical/HCIsNot.h', |
| 201 'src/Source/Library/Number/HCIsCloseTo.h', |
| 202 'src/Source/Library/Number/HCIsEqualToNumber.h', |
| 203 'src/Source/Library/Number/HCIsTrueFalse.h', |
| 204 'src/Source/Library/Number/HCNumberAssert.h', |
| 205 'src/Source/Library/Number/HCOrderingComparison.h', |
| 206 'src/Source/Library/Object/HCArgumentCaptor.h', |
| 207 'src/Source/Library/Object/HCClassMatcher.h', |
| 208 'src/Source/Library/Object/HCConformsToProtocol.h', |
| 209 'src/Source/Library/Object/HCHasDescription.h', |
| 210 'src/Source/Library/Object/HCHasProperty.h', |
| 211 'src/Source/Library/Object/HCIsEqual.h', |
| 212 'src/Source/Library/Object/HCIsInstanceOf.h', |
| 213 'src/Source/Library/Object/HCIsNil.h', |
| 214 'src/Source/Library/Object/HCIsSame.h', |
| 215 'src/Source/Library/Object/HCIsTypeOf.h', |
| 216 'src/Source/Library/Object/HCThrowsException.h', |
| 217 'src/Source/Library/Text/HCIsEqualIgnoringCase.h', |
| 218 'src/Source/Library/Text/HCIsEqualIgnoringWhiteSpace.h', |
| 219 'src/Source/Library/Text/HCStringContains.h', |
| 220 'src/Source/Library/Text/HCStringContainsInOrder.h', |
| 221 'src/Source/Library/Text/HCStringEndsWith.h', |
| 222 'src/Source/Library/Text/HCStringStartsWith.h', |
| 223 'src/Source/Library/Text/HCSubstringMatcher.h', |
| 224 'src/Source/OCHamcrest.h', |
213 ], | 225 ], |
214 'xcode_settings': { | 226 'xcode_settings': { |
215 'CLANG_ENABLE_OBJC_ARC': 'YES', | 227 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
| 228 'USE_HEADERMAP': 'YES', |
| 229 'CLANG_ENABLE_ARC': 'YES', |
216 }, | 230 }, |
| 231 'include_dirs': [ |
| 232 'src', |
| 233 'src/Source', |
| 234 ], |
| 235 'mac_framework_dirs': [ |
| 236 '$(SDKROOT)/../../Library/Frameworks', |
| 237 ], |
217 'link_settings': { | 238 'link_settings': { |
218 'libraries': [ | 239 'libraries': [ |
219 'XCTest.framework', | 240 'Foundation.framework', |
220 ], | 241 'UIKit.framework', |
221 }, | |
222 'dependencies': [ | |
223 'ochamcrest_copy_sources', | |
224 ], | |
225 'export_dependent_settings': [ | |
226 'ochamcrest_copy_sources', | |
227 ], | |
228 'direct_dependent_settings': { | |
229 'include_dirs': [ | |
230 '<(ochamcrest_copy_dir)', | |
231 ], | 242 ], |
232 }, | 243 }, |
233 }, | 244 }, |
234 ], | 245 ], |
235 } | 246 } |
OLD | NEW |