diff options
author | Brad King <brad.king@kitware.com> | 2011-12-06 17:06:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-07 14:39:46 (GMT) |
commit | 4080d5510e5a97de8f3659b5ca4c88d17b81f31d (patch) | |
tree | 9d98b843c6fa82f9aacba675975a3a667fed4af1 /Modules/CMakeCXXCompilerId.cpp.in | |
parent | 2cc205a0fb070a5022a6b1c449dafb2423b8fbdb (diff) | |
download | CMake-4080d5510e5a97de8f3659b5ca4c88d17b81f31d.zip CMake-4080d5510e5a97de8f3659b5ca4c88d17b81f31d.tar.gz CMake-4080d5510e5a97de8f3659b5ca4c88d17b81f31d.tar.bz2 |
Detect Borland compiler version with its id
Decode hex digits from __BORLANDC__ to compute the version number
components. Note that the constant encodes decimal digits as hex digits
(never larger than 9). We represent them as decimal after extraction.
See documentation at
http://predef.sourceforge.net/precomp.html
http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index bdc520c..4c42f8a 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -22,6 +22,8 @@ #elif defined(__BORLANDC__) # define COMPILER_ID "Borland" +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) #elif defined(__WATCOMC__) # define COMPILER_ID "Watcom" |