diff options
author | Brad King <brad.king@kitware.com> | 2019-04-04 15:40:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-04 15:40:22 (GMT) |
commit | 192aa506c66d5269e10d87f1a67df5397325a9af (patch) | |
tree | f881b8dbbc5f096763885fa06369a1b2a2fcc993 /Modules | |
parent | d2473769e77f9cf9802c71effadb5e1469fcd625 (diff) | |
parent | 33ee7793300f6ef9f5206e5a0539c192affa3d23 (diff) | |
download | CMake-192aa506c66d5269e10d87f1a67df5397325a9af.zip CMake-192aa506c66d5269e10d87f1a67df5397325a9af.tar.gz CMake-192aa506c66d5269e10d87f1a67df5397325a9af.tar.bz2 |
Merge branch 'vs2019-redist' into release-3.14
Merge-request: !3186
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 23 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 5 |
2 files changed, 18 insertions, 10 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 5ba8687..2f34a7a 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -210,20 +210,25 @@ if(MSVC) set(_MSVC_IDE_VERSION "") if(MSVC_VERSION GREATER_EQUAL 2000) message(WARNING "MSVC ${MSVC_VERSION} not yet supported.") - elseif(MSVC_TOOLSET_VERSION) - set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION}) + elseif(MSVC_VERSION_VERSION GREATER_EQUAL 143) + message(WARNING "MSVC toolset v${MSVC_VERSION_VERSION} not yet supported.") + elseif(MSVC_TOOLSET_VERSION EQUAL 142) + # FIXME: VS 2019 RC 4 uses VC141 but an update will fix it to be VC142. + set(MSVC_REDIST_NAME VC141) + set(_MSVC_DLL_VERSION 140) + set(_MSVC_IDE_VERSION 16) + elseif(MSVC_TOOLSET_VERSION EQUAL 141) + set(MSVC_REDIST_NAME VC141) + set(_MSVC_DLL_VERSION 140) + set(_MSVC_IDE_VERSION 15) if(MSVC_VERSION EQUAL 1910) # VS2017 named this differently prior to update 3. set(MSVC_REDIST_NAME VC150) endif() - + elseif(MSVC_TOOLSET_VERSION) + set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION}) math(EXPR _MSVC_DLL_VERSION "${MSVC_TOOLSET_VERSION} / 10 * 10") - - if(MSVC_TOOLSET_VERSION EQUAL 141) - set(_MSVC_IDE_VERSION 15) - else() - math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10") - endif() + math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10") endif() set(_MSVCRT_DLL_VERSION "") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 2daf313..a6448a0 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -71,7 +71,10 @@ if(NOT MSVC_VERSION) message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}") endif() - if(MSVC_VERSION GREATER_EQUAL 1910) + if(MSVC_VERSION GREATER_EQUAL 1920) + # VS 2019 or greater + set(MSVC_TOOLSET_VERSION 142) + elseif(MSVC_VERSION GREATER_EQUAL 1910) # VS 2017 or greater set(MSVC_TOOLSET_VERSION 141) elseif(MSVC_VERSION EQUAL 1900) |