From 7a3277276e69c92d0f69674cdc27bae11bcbc14f Mon Sep 17 00:00:00 2001
From: James Johnston <johnstonj.public@codenest.com>
Date: Thu, 3 Dec 2015 21:24:56 +0000
Subject: [PATCH] Embarcadero: Fix erroneous interpretation of
 __CODEGEARC_VERSION__.

As per the following link:

  http://docwiki.embarcadero.com/RADStudio/Seattle/en/Example_of_CODEGEARC_VERSION_Macro

The major/minor versions must be decoded as a hex string, while the patch
version must be decoded as a normal decimal string.

As an example, C++ Builder XE 8.1's bcc32.exe sets this macro to 0x070189C9.
The file version of bcc32.exe is 7.1.5570.35273.  Therefore, the correct
interpretation to COMPILER_VERSION would be 7.1.35273.
---
 Modules/Compiler/Embarcadero-DetermineCompiler.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Compiler/Embarcadero-DetermineCompiler.cmake b/Modules/Compiler/Embarcadero-DetermineCompiler.cmake
index 2feedac358..8375624e9c 100644
--- a/Modules/Compiler/Embarcadero-DetermineCompiler.cmake
+++ b/Modules/Compiler/Embarcadero-DetermineCompiler.cmake
@@ -4,4 +4,4 @@ set(_compiler_id_pp_test "defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__
 set(_compiler_id_version_compute "
 # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_HEX@(__CODEGEARC_VERSION__>>24 & 0x00FF)
 # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_HEX@(__CODEGEARC_VERSION__>>16 & 0x00FF)
-# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_HEX@(__CODEGEARC_VERSION__     & 0xFFFF)")
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__CODEGEARC_VERSION__     & 0xFFFF)")
-- 
GitLab