summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-24 20:12:31 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-25 16:45:44 (GMT)
commitc46b265839c408ba04edc6ae7c96bc257547f43c (patch)
tree30172385edacef220a835c568e73513ff4ccd4a5 /Source/cmake.cxx
parentb610b7a35cd62ce180ef3f5be4fabd9336f3fe51 (diff)
downloadCMake-c46b265839c408ba04edc6ae7c96bc257547f43c.zip
CMake-c46b265839c408ba04edc6ae7c96bc257547f43c.tar.gz
CMake-c46b265839c408ba04edc6ae7c96bc257547f43c.tar.bz2
VS: Add Visual Studio 17 2022 generator
Fixes: #22339
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7868859..14f66d9 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2201,7 +2201,9 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator()
"\\Setup\\VC;ProductDir", //
";InstallDir" //
};
- if (cmVSSetupAPIHelper(16).IsVSInstalled()) {
+ if (cmVSSetupAPIHelper(17).IsVSInstalled()) {
+ found = "Visual Studio 17 2022";
+ } else if (cmVSSetupAPIHelper(16).IsVSInstalled()) {
found = "Visual Studio 16 2019";
} else if (cmVSSetupAPIHelper(15).IsVSInstalled()) {
found = "Visual Studio 15 2017";
@@ -2506,6 +2508,8 @@ void cmake::AddDefaultGenerators()
#if defined(_WIN32) && !defined(__CYGWIN__)
# if !defined(CMAKE_BOOT_MINGW)
this->Generators.push_back(
+ cmGlobalVisualStudioVersionedGenerator::NewFactory17());
+ this->Generators.push_back(
cmGlobalVisualStudioVersionedGenerator::NewFactory16());
this->Generators.push_back(
cmGlobalVisualStudioVersionedGenerator::NewFactory15());