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 # OCHamcrest sources contains import rules using relative file names | 5 import("//build/config/ios/rules.gni") |
6 # ("HCAssertThat.h") and other using paths in an installed framework | 6 |
7 # (<OCHamcrest/HCMatcher.h>). In order to build, copy all the sources | 7 config("config") { |
8 # to <(SHARED_INTERMEDIATE_DIR)/ios/third_party/ochmacrest/OCHamcrest | 8 libs = [ |
9 # so that both type of import work (another option considered was to | 9 "Foundation.framework", |
10 # build forwarding headers but this required duplicating the list of | 10 "UIKit.framework", |
11 # files in GN build and was ruled out). | 11 ] |
12 # | 12 } |
13 # To avoid ODR violation, direct import of ios/third_party/ochamcrest | 13 |
14 # is forbidden in ios/DEPS and code should instead use import as if | 14 ios_framework_bundle("ochamcrest") { |
15 # OCHamcrest was in a framework (i.e. #import <OCHamcrest/OCHamcrest.h>). | 15 output_name = "OCHamcrest" |
16 copy("ochamcrest_copy_files") { | |
17 testonly = true | |
18 visibility = [ ":ochamcrest" ] | |
19 sources = [ | 16 sources = [ |
20 "src/Source/Core/HCAssertThat.h", | 17 "src/Source/Core/HCAssertThat.h", |
21 "src/Source/Core/HCAssertThat.m", | 18 "src/Source/Core/HCAssertThat.m", |
22 "src/Source/Core/HCBaseDescription.h", | 19 "src/Source/Core/HCBaseDescription.h", |
23 "src/Source/Core/HCBaseDescription.m", | 20 "src/Source/Core/HCBaseDescription.m", |
24 "src/Source/Core/HCBaseMatcher.h", | 21 "src/Source/Core/HCBaseMatcher.h", |
25 "src/Source/Core/HCBaseMatcher.m", | 22 "src/Source/Core/HCBaseMatcher.m", |
26 "src/Source/Core/HCDescription.h", | 23 "src/Source/Core/HCDescription.h", |
27 "src/Source/Core/HCDiagnosingMatcher.h", | 24 "src/Source/Core/HCDiagnosingMatcher.h", |
28 "src/Source/Core/HCDiagnosingMatcher.m", | 25 "src/Source/Core/HCDiagnosingMatcher.m", |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 "src/Source/Library/Text/HCStringContainsInOrder.h", | 160 "src/Source/Library/Text/HCStringContainsInOrder.h", |
164 "src/Source/Library/Text/HCStringContainsInOrder.m", | 161 "src/Source/Library/Text/HCStringContainsInOrder.m", |
165 "src/Source/Library/Text/HCStringEndsWith.h", | 162 "src/Source/Library/Text/HCStringEndsWith.h", |
166 "src/Source/Library/Text/HCStringEndsWith.m", | 163 "src/Source/Library/Text/HCStringEndsWith.m", |
167 "src/Source/Library/Text/HCStringStartsWith.h", | 164 "src/Source/Library/Text/HCStringStartsWith.h", |
168 "src/Source/Library/Text/HCStringStartsWith.m", | 165 "src/Source/Library/Text/HCStringStartsWith.m", |
169 "src/Source/Library/Text/HCSubstringMatcher.h", | 166 "src/Source/Library/Text/HCSubstringMatcher.h", |
170 "src/Source/Library/Text/HCSubstringMatcher.m", | 167 "src/Source/Library/Text/HCSubstringMatcher.m", |
171 "src/Source/OCHamcrest.h", | 168 "src/Source/OCHamcrest.h", |
172 ] | 169 ] |
173 outputs = [ | 170 public_headers = [ |
174 "$root_gen_dir/ios/third_party/ochamcrest/OCHamcrest/{{source_file_part}}", | 171 "src/Source/Core/HCAssertThat.h", |
| 172 "src/Source/Core/HCBaseDescription.h", |
| 173 "src/Source/Core/HCBaseMatcher.h", |
| 174 "src/Source/Core/HCDescription.h", |
| 175 "src/Source/Core/HCDiagnosingMatcher.h", |
| 176 "src/Source/Core/HCMatcher.h", |
| 177 "src/Source/Core/HCSelfDescribing.h", |
| 178 "src/Source/Core/HCStringDescription.h", |
| 179 "src/Source/Core/Helpers/HCCollect.h", |
| 180 "src/Source/Core/Helpers/HCInvocationMatcher.h", |
| 181 "src/Source/Core/Helpers/HCRequireNonNilObject.h", |
| 182 "src/Source/Core/Helpers/HCWrapInMatcher.h", |
| 183 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h", |
| 184 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h", |
| 185 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h", |
| 186 "src/Source/Library/Collection/HCEvery.h", |
| 187 "src/Source/Library/Collection/HCHasCount.h", |
| 188 "src/Source/Library/Collection/HCIsCollectionContaining.h", |
| 189 "src/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h", |
| 190 "src/Source/Library/Collection/HCIsCollectionContainingInOrder.h", |
| 191 "src/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h", |
| 192 "src/Source/Library/Collection/HCIsCollectionOnlyContaining.h", |
| 193 "src/Source/Library/Collection/HCIsDictionaryContaining.h", |
| 194 "src/Source/Library/Collection/HCIsDictionaryContainingEntries.h", |
| 195 "src/Source/Library/Collection/HCIsDictionaryContainingKey.h", |
| 196 "src/Source/Library/Collection/HCIsDictionaryContainingValue.h", |
| 197 "src/Source/Library/Collection/HCIsEmptyCollection.h", |
| 198 "src/Source/Library/Collection/HCIsIn.h", |
| 199 "src/Source/Library/Decorator/HCDescribedAs.h", |
| 200 "src/Source/Library/Decorator/HCIs.h", |
| 201 "src/Source/Library/Logical/HCAllOf.h", |
| 202 "src/Source/Library/Logical/HCAnyOf.h", |
| 203 "src/Source/Library/Logical/HCIsAnything.h", |
| 204 "src/Source/Library/Logical/HCIsNot.h", |
| 205 "src/Source/Library/Number/HCIsCloseTo.h", |
| 206 "src/Source/Library/Number/HCIsEqualToNumber.h", |
| 207 "src/Source/Library/Number/HCIsTrueFalse.h", |
| 208 "src/Source/Library/Number/HCNumberAssert.h", |
| 209 "src/Source/Library/Number/HCOrderingComparison.h", |
| 210 "src/Source/Library/Object/HCArgumentCaptor.h", |
| 211 "src/Source/Library/Object/HCClassMatcher.h", |
| 212 "src/Source/Library/Object/HCConformsToProtocol.h", |
| 213 "src/Source/Library/Object/HCHasDescription.h", |
| 214 "src/Source/Library/Object/HCHasProperty.h", |
| 215 "src/Source/Library/Object/HCIsEqual.h", |
| 216 "src/Source/Library/Object/HCIsInstanceOf.h", |
| 217 "src/Source/Library/Object/HCIsNil.h", |
| 218 "src/Source/Library/Object/HCIsSame.h", |
| 219 "src/Source/Library/Object/HCIsTypeOf.h", |
| 220 "src/Source/Library/Object/HCThrowsException.h", |
| 221 "src/Source/Library/Text/HCIsEqualIgnoringCase.h", |
| 222 "src/Source/Library/Text/HCIsEqualIgnoringWhiteSpace.h", |
| 223 "src/Source/Library/Text/HCStringContains.h", |
| 224 "src/Source/Library/Text/HCStringContainsInOrder.h", |
| 225 "src/Source/Library/Text/HCStringEndsWith.h", |
| 226 "src/Source/Library/Text/HCStringStartsWith.h", |
| 227 "src/Source/Library/Text/HCSubstringMatcher.h", |
| 228 "src/Source/OCHamcrest.h", |
175 ] | 229 ] |
176 } | |
177 | 230 |
178 config("config") { | 231 configs = [ |
179 visibility = [ ":ochamcrest" ] | |
180 libs = [ "XCTest.framework" ] | |
181 include_dirs = [ "$root_gen_dir/ios/third_party/ochamcrest" ] | |
182 } | |
183 | |
184 source_set("ochamcrest") { | |
185 testonly = true | |
186 configs += [ | |
187 ":config", | 232 ":config", |
188 "//build/config/compiler:enable_arc", | 233 "//build/config/compiler:enable_arc", |
189 "//build/config/compiler:no_chromium_code", | |
190 ] | 234 ] |
191 public_configs = [ ":config" ] | 235 removed_configs = [ "//build/config/gcc:symbol_visibility_hidden" ] |
192 public_deps = [ | 236 if (removed_configs == []) { |
193 ":ochamcrest_copy_files", | 237 print("force usage of removed_configs, see http://crbug.com/602217") |
194 ] | 238 } |
195 sources = get_target_outputs(":ochamcrest_copy_files") | |
196 } | 239 } |
OLD | NEW |