-isysroot does not take multiple architectures into account
When multiple architectures are set in `CMAKE_OSX_ARCHITECTURES`, e.g. `"arm64;armv7;x86_64"`, the `-isysroot` flag can't be passed unconditionally, as the SDK in the single `CMAKE_OSX_SYSROOT` may not support all the architectures. This is typically the case of iOS simulator and device SDKs.
issue