summaryrefslogtreecommitdiff
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-22 10:27:09 -0400
committerBrad King <brad.king@kitware.com>2012-08-22 10:27:09 -0400
commit622d9a789dc72b159f7d571e3a700db5d090c1ef (patch)
treea2767761868a6fabf3599530da506fa10d676ffc /Modules/CMakeCCompilerId.c.in
parent4ad7fa64889d4a05bce3540ae1a6dbd87f654d9d (diff)
downloadcmake-622d9a789dc72b159f7d571e3a700db5d090c1ef.tar.gz
Detect SDCC compiler version with its id
Decode decimal digits from SDCC to compute version number components. See documentation at: http://sdcc.sourceforge.net/doc/sdccman.pdf http://sourceforge.net/p/predef/wiki/Compilers/#small-device-c-compilerhttpenwikipediaorgwikismall_device_c_compiler
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 331be069e5..d6e192d60f 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -160,6 +160,10 @@
http://sdcc.sourceforge.net */
#elif defined(SDCC)
# define COMPILER_ID "SDCC"
+ /* SDCC = VRP */
+# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
+# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"