Commit Graph

8 Commits

Author SHA1 Message Date
Stephen Kelly 9d767810e1 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
If no compiler feature information is known for a given compiler
version, do not set a language standard default either.  The two
settings must be recorded consistently.
2015-02-04 18:29:53 -05:00
Stephen Kelly 82c9d6868b AppleClang: Remove redundant UNIX condition. 2015-02-04 18:28:06 -05:00
Stephen Kelly a60027a642 Features: Ensure appropriate return value from feature test macros.
GNU-CXX already has complex logic and sets the _result to 0 before
tests which may set it to something else.

Change the other modules to be consistent with that.
2015-01-15 22:13:21 +01:00
Stephen Kelly 3ad893b5c2 Features: Record for historical Xcode clang versions. 2015-01-11 16:52:27 +01:00
Stephen Kelly 98965fb12d Features: Record dialect flags for AppleClang 4.0+. 2015-01-11 16:52:05 +01:00
Stephen Kelly bd6b42c186 Features: Record for AppleClang 5.1
Apple's Clang 5.1 already supports most of the C and C++ features CMake
enumerates.
2014-12-22 10:44:41 -05:00
Stephen Kelly ded30405b2 Features: Don't record for AppleClang
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.
2014-11-12 23:20:36 +01:00
Brad King ab65862417 Clang: Add separate "AppleClang" compiler id
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.
2013-10-07 20:12:46 -04:00