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
This commit is contained in:
parent
b8cfa656ce
commit
5899b988d5
|
@ -17,6 +17,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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue