diff options
author | Brad King <brad.king@kitware.com> | 2019-04-03 16:03:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-09-02 17:47:42 (GMT) |
commit | f01ea7e391a23622df2943dc0931a36c5c507bc5 (patch) | |
tree | e62c323323292299789a02898ff52eaf84c9b991 /Modules | |
parent | 31c5700d4322ecfa169db2fccf385d6eced4e737 (diff) | |
download | CMake-f01ea7e391a23622df2943dc0931a36c5c507bc5.zip CMake-f01ea7e391a23622df2943dc0931a36c5c507bc5.tar.gz CMake-f01ea7e391a23622df2943dc0931a36c5c507bc5.tar.bz2 |
MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset
This was forgotten in commit 0c7f918fb1 (VS: Update Visual Studio 17
2022 generator for Preview 2, 2021-07-14, v3.21.1~29^2) when the toolset
was first renumbered to `v143`.
Fixes: #22585
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 4223bde..7d602c3 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -67,7 +67,10 @@ if(NOT MSVC_VERSION) message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}") endif() - if(MSVC_VERSION GREATER_EQUAL 1920) + if(MSVC_VERSION GREATER_EQUAL 1930) + # VS 2022 or greater + set(MSVC_TOOLSET_VERSION 143) + elseif(MSVC_VERSION GREATER_EQUAL 1920) # VS 2019 or greater set(MSVC_TOOLSET_VERSION 142) elseif(MSVC_VERSION GREATER_EQUAL 1910) |