macOS build issues, not detecting metal

Hello all,

After recent updates on my MBP my setup to build my project with MoltenVK suddenly stopped working. Long story short, it turns out, for some reason HAVE_FRAMEWORK_METAL was not working.

When building with cmake, logs are plagued with:

CMakeFiles/cmTC_5407b.dir/src.c.o:1:1: error: source file is not valid UTF-8
… (2000 lines later)
CMakeFiles/cmTC_5407b.dir/src.c.o:2:934: warning: null character ignored [-Wnull-character] ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
702 warnings and 20 errors generated.
make[1]: *** [cmTC_5407b] Error 1
make: *** [cmTC_5407b/fast] Error 2

Every single character in those files seems to be somehow wrong. I tried to get this string into vscode and check encoding and line endings but it does not work. However, when I changed flags for this from -x objective-c => -ObjC it works fine. I do not code objective-c so I have no idea why this is more correct.

My environment version is:
AppleClang 11.0.3.11030032 (latest Xcode)
macOS 10.15.4
cmake version 3.17.1