mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Merge pull request #380 from vgorloff/master
Fixes issue with wrong build phase for Metal files.
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user