summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-16 15:49:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-16 15:50:01 (GMT)
commit8f9301ba255a75956eb80942686808e8f4b114ce (patch)
tree711518d09b3f776d0faee1537548f1785f331c02 /Modules
parente24d2b58b4009b023c54f7ec21018d1873e14f47 (diff)
parent3bc21a70b5c026d2dfe400ea3180f33bbaf529ea (diff)
downloadCMake-8f9301ba255a75956eb80942686808e8f4b114ce.zip
CMake-8f9301ba255a75956eb80942686808e8f4b114ce.tar.gz
CMake-8f9301ba255a75956eb80942686808e8f4b114ce.tar.bz2
Merge topic 'msvc-version'
3bc21a70 MSVC: Fix MSVC_VERSION when mixing MSVC C/C++ with Intel Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1488
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 4719563..0737c12 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -48,7 +48,11 @@ else()
endif()
if(NOT MSVC_VERSION)
- if(CMAKE_C_SIMULATE_VERSION)
+ if("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC")
+ set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
+ elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
+ set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
+ elseif(CMAKE_C_SIMULATE_VERSION)
set(_compiler_version ${CMAKE_C_SIMULATE_VERSION})
elseif(CMAKE_CXX_SIMULATE_VERSION)
set(_compiler_version ${CMAKE_CXX_SIMULATE_VERSION})