Features are currently recorded accidentally for all versions of
AppleClang > 3.4 (I have no idea how that relates to upstream
Clang). Presumably that version has the features which are
accidentally recorded, but in the future features will be
recorded initially for only AppleClang >= 5.1, which would
appear as a feature regression.
Commit v3.1.0-rc1~635^2~11 (Don't load Clang-CXX from
AppleClang-CXX., 2013-11-11) ajusted the logic for the CXX
language. Make a similar change for the C language.
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang. Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION. Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.
Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.