diff options
author | Brad King <brad.king@kitware.com> | 2012-02-17 19:17:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-20 15:09:44 (GMT) |
commit | bdbbf763d65a4040001188b2e2d05bdab4a35427 (patch) | |
tree | eaadd566c41ec44e444123435ef8a2a753fa9302 /Modules/CMakeCCompilerId.c.in | |
parent | 3f78ced7c2318b23610c6a4ffdf727bde0efa529 (diff) | |
download | CMake-bdbbf763d65a4040001188b2e2d05bdab4a35427.zip CMake-bdbbf763d65a4040001188b2e2d05bdab4a35427.tar.gz CMake-bdbbf763d65a4040001188b2e2d05bdab4a35427.tar.bz2 |
Recognize Embarcadero compiler (#12604)
The Borland compiler was re-branded as CodeGear during 2007-2009 and
since 2009 is the Embarcadero compiler. They offer predefined macros:
http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros
and distinguish themselves by __CODEGEARC__ and __CODEGEARC_VERSION__.
Version 6.30 (C++Builder XE) changed the meaning of some flags:
http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE
Teach Embarcadero compiler information files to generate build rules
with flags matching the compiler version. Leave the flags unchanged
for old Borland versions. Always set the BORLAND toolchain indicator
for compatibility with existing projects that test it. Also set the
EMBARCADERO indicator for newer toolchains.
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index b0f5eb6..06aa9bf 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -26,6 +26,12 @@ # define COMPILER_VERSION_MINOR DEC(__clang_minor__) # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF) + #elif defined(__BORLANDC__) # define COMPILER_ID "Borland" /* __BORLANDC__ = 0xVRR */ |