How to change Other Metal Compiler Flags for a Package?

4 weeks ago 28
ARTICLE AD BOX

I want to enable Metal shaders logging for a Swift Package as described here:

Choose your project in the Project Navigator and select the target you want to enable logging for. Click Build Settings at the top. Search for “Other Metal Compiler Flags”. Add -fmetal-enable-logging as a compile flag.

This guide is for an Xcode project, but I don't know how to find those settings in a swift package.

targets: [ // A separate target for shaders. .target( name: "MetalShaders", resources: [ .process("Metal") ], cSettings: [ // This doesn't work //.unsafeFlags(["-fmetal-enable-logging"], .when(configuration: .debug)) ] ), .target( name: "MegApp", dependencies: ["MetalShaders"] )
Read Entire Article