diff options
author | Brad King <brad.king@kitware.com> | 2019-01-15 18:23:29 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-15 13:23:38 -0500 |
commit | 41b0c0dc739c34550b8e9054b9a88405afb6518d (patch) | |
tree | e105225815d76cd1f996416bbafdeeb6f918dc23 /Source/cmake.cxx | |
parent | 67422bf579e5c274794f131f008bec4ec1e7d4b9 (diff) | |
parent | 57e48f16f2c3b73fb27057267c8092a41005bb75 (diff) | |
download | cmake-41b0c0dc739c34550b8e9054b9a88405afb6518d.tar.gz |
Merge topic 'vs2019'
57e48f16f2 VS: Add Visual Studio 16 2019 generator
bdef729646 VS: Parameterize VS 2017 generator to support future versions
68d316e0cf VS: Rename VS 2017 generator sources to be version-independent
d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2789
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bfb066d97c..dfdcf8a99c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -55,8 +55,8 @@ # include "cmGlobalVisualStudio11Generator.h" # include "cmGlobalVisualStudio12Generator.h" # include "cmGlobalVisualStudio14Generator.h" -# include "cmGlobalVisualStudio15Generator.h" # include "cmGlobalVisualStudio9Generator.h" +# include "cmGlobalVisualStudioVersionedGenerator.h" # include "cmVSSetupHelper.h" # define CMAKE_HAVE_VS_GENERATORS @@ -1545,8 +1545,9 @@ void cmake::CreateDefaultGlobalGenerator() "\\Setup\\VC;ProductDir", // ";InstallDir" // }; - cmVSSetupAPIHelper vsSetupAPIHelper; - if (vsSetupAPIHelper.IsVS2017Installed()) { + if (cmVSSetupAPIHelper(16).IsVSInstalled()) { + found = "Visual Studio 16 2019"; + } else if (cmVSSetupAPIHelper(15).IsVSInstalled()) { found = "Visual Studio 15 2017"; } else { for (VSVersionedGenerator const* g = cm::cbegin(vsGenerators); @@ -1800,7 +1801,10 @@ void cmake::AddDefaultGenerators() { #if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(CMAKE_BOOT_MINGW) - this->Generators.push_back(cmGlobalVisualStudio15Generator::NewFactory()); + this->Generators.push_back( + cmGlobalVisualStudioVersionedGenerator::NewFactory16()); + this->Generators.push_back( + cmGlobalVisualStudioVersionedGenerator::NewFactory15()); this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio11Generator::NewFactory()); |