Use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set the Xcode
SDKROOT and MACOSX_DEPLOYMENT_TARGET build settings. This is necessary
because some versions of Xcode select a different compiler based on
these settings. We need to make sure the compiler identified during
language initialization matches what will be used for the actual build.
Configure a hand-generated Xcode project to build the compiler id source
file since we cannot run the compiler command-line tool directly. Add a
post-build shell script phase to print out the compiler toolset build
setting. Run xcodebuild to compile the identification binary. Parse
the full path to the compiler tool from the xcodebuild output.