From c198730b4558d03b9b98a5eedbf5653eb79ac09d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 7 Dec 2011 09:18:13 -0500 Subject: Detect Watcom compiler version with its id Decode decimal digits from __WATCOMC__ to compute the version number components. See documentation at: http://predef.sourceforge.net/precomp.html --- Modules/CMakeCCompilerId.c.in | 2 ++ Modules/CMakeCXXCompilerId.cpp.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index cfa65c2..af59349 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -28,6 +28,8 @@ #elif defined(__WATCOMC__) # define COMPILER_ID "Watcom" +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100) #elif defined(__SUNPRO_C) # define COMPILER_ID "SunPro" diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 19fa730..d3fcc4b 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -30,6 +30,8 @@ #elif defined(__WATCOMC__) # define COMPILER_ID "Watcom" +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100) #elif defined(__SUNPRO_CC) # define COMPILER_ID "SunPro" -- cgit v0.12