CrossCompiling: Support host platform with different architecture
Teach CMake to support using -DCMAKE_SYSTEM_PROCESSOR=
to activate
cross-compiling to the host platform with a different architecture.
Original Description
Add crosscompilation support for same CMAKE_SYSTEM_NAME but different CMAKE_SYSTEM_PROCESSOR.
This is useful when building macOS fat (universal2) binaries.
For example this change will not reset and make use of CMAKE_SYSTEM_PROCESSOR after project() call even when target CMAKE_SYSTEM_NAME is the same as CMAKE_HOST_SYSTEM_NAME or is not defined.
Fixes: #25640
Topic-rename: crosscompiling-host-platform-different-arch
Edited by Brad King