summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-07 14:18:13 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-07 14:39:50 (GMT)
commitc198730b4558d03b9b98a5eedbf5653eb79ac09d (patch)
tree0b1baa91235894acd1dbc736f4daaa0b802a4966
parent5899b988d5306a301b768eadd43bc3ff4b6b839b (diff)
downloadCMake-c198730b4558d03b9b98a5eedbf5653eb79ac09d.zip
CMake-c198730b4558d03b9b98a5eedbf5653eb79ac09d.tar.gz
CMake-c198730b4558d03b9b98a5eedbf5653eb79ac09d.tar.bz2
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
-rw-r--r--Modules/CMakeCCompilerId.c.in2
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in2
2 files changed, 4 insertions, 0 deletions
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"