diff options
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 6 |
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}) |