From 622d9a789dc72b159f7d571e3a700db5d090c1ef Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 22 Aug 2012 10:27:09 -0400 Subject: 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 --- Modules/CMakeCCompilerId.c.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 331be06..d6e192d 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" -- cgit v0.12