diff options
author | Brad King <brad.king@kitware.com> | 2011-12-06 20:14:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-07 14:39:49 (GMT) |
commit | 5899b988d5306a301b768eadd43bc3ff4b6b839b (patch) | |
tree | fc146e5dc2fa4353aeb16135463256459e005dcf /Modules/CMakeCXXCompilerId.cpp.in | |
parent | b8cfa656ce7a59bc616eda8d4180ea9642291d07 (diff) | |
download | CMake-5899b988d5306a301b768eadd43bc3ff4b6b839b.zip CMake-5899b988d5306a301b768eadd43bc3ff4b6b839b.tar.gz CMake-5899b988d5306a301b768eadd43bc3ff4b6b839b.tar.bz2 |
Detect Clang compiler version with its id
Decode decimal digits from
__clang_major__
__clang_minor__
__clang_patchlevel__
to compute version number components. See documentation at:
http://clang.llvm.org/docs/LanguageExtensions.html#builtinmacros
http://predef.sourceforge.net/precomp.html
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index f2d6f6b..19fa730 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -19,6 +19,9 @@ #elif defined(__clang__) # define COMPILER_ID "Clang" +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) #elif defined(__BORLANDC__) # define COMPILER_ID "Borland" |