summaryrefslogtreecommitdiff
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-11 13:54:50 -0400
committerBrad King <brad.king@kitware.com>2013-10-18 09:55:59 -0400
commita85e17e660c47820ccccd8378349497804d94483 (patch)
tree28d211b2814865d81830b112fffc398ace58919b /Modules/CMakeCCompilerId.c.in
parentaf40e8c31256095eb8436b798fa1fbc0c71b0319 (diff)
downloadcmake-a85e17e660c47820ccccd8378349497804d94483.tar.gz
Intel: When simulating MSVC, re-use Windows-MSVC (#14476)
Teach CMake(C|CXX|Fortran)CompilerId* to report the MSVC version simulated by the Intel compiler, if any. Refactor the Windows-Intel platform information helper module to load Windows-MSVC instead of duplicating the information. Teach Windows-MSVC to understand when it is loaded as the simulated Fortran compiler (its preprocessor is simulated).
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 6dde1c3b23..871cccd1ef 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -19,6 +19,12 @@
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
+# if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+ /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"