summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
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 /Modules/CMakeCXXCompilerId.cpp.in
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
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in2
1 files changed, 2 insertions, 0 deletions
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"