Some cross compiling macOS -> iOS cases broken since CMake 3.4
Commit 24aafbde broke cross compilation for ios / tvos.
Before this it was possible to not set CMAKE_OSX_DEPLOYMENT_TARGET which is ok when you do cross compile and pass sysroot and deployment-target via cflags, cxxflags.
WIth this commit the CMAKE_OSX_DEPLOYMENT_TARGET is set to the version of the host os in some situations. This results in the fact that the -mmacosx-version-min= flag is added to cflags / cxxflags.
When compiling for ios for example in need to set -miphoneos-version-min instead ... with this change - both gets set ( "-miphoneos-version-min" <- through my toolchain.cmake and "-mmacosx-version-min" because of CMAKE_OSX_DEPLOYMENT_TARGET) and cmake fails during compiler checking because this is an invalid combination of flags.
Might be the cause for this too: #16349 (closed) - not sure. (EDIT: it is not)