Variable '~' set but not used errors, while building source code in Xcode

Try selecting the ShaderCompileWorker_Build target (e.g., the one with the archery target icon) and setting the option there, instead of the target you’ve got selected in that image?

That’s a random stab in the dark, mind you, but it’s where I’d start. Since, looking at the sidebar, the errors are in that target.

(Alternatively, set it up at the project level and delete the setting manually in all the targets, so that they inherit the project-level value.)