summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index f4a4176..915ae7f 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -38,6 +38,12 @@
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# 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(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"