summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-06 20:14:47 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-07 14:39:49 (GMT)
commit5899b988d5306a301b768eadd43bc3ff4b6b839b (patch)
treefc146e5dc2fa4353aeb16135463256459e005dcf /Modules/CMakeCXXCompilerId.cpp.in
parentb8cfa656ce7a59bc616eda8d4180ea9642291d07 (diff)
downloadCMake-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.in3
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"