Merge pull request #380 from vgorloff/master

Fixes issue with wrong build phase for Metal files.
This commit is contained in:
Yonas Kolb
2018-08-17 17:57:05 +10:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ class SourceGenerator {
}
if let fileExtension = path.extension {
switch fileExtension {
case "swift", "m", "mm", "cpp", "c", "cc", "S", "xcdatamodeld": return .sources
case "swift", "m", "mm", "cpp", "c", "cc", "S", "xcdatamodeld", "metal": return .sources
case "h", "hh", "hpp", "ipp", "tpp", "hxx", "def": return .headers
case "modulemap":
guard targetType == .staticLibrary else { return nil }
@@ -390,6 +390,7 @@ class SourceGeneratorTests: XCTestCase {
- file.apns
- file.123
- file.xcassets
- file.metal
- Info.plist
"""
try createDirectories(directories)
@@ -437,6 +438,7 @@ class SourceGeneratorTests: XCTestCase {
try pbxProj.expectFile(paths: ["C", "file.xcassets"], buildPhase: .resources)
try pbxProj.expectFile(paths: ["C", "file.123"], buildPhase: .resources)
try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: .none)
try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources)
}
$0.it("duplicate TargetSource is included once in sources build phase") {