VS: Select and save a VS 2017 instance persistently

Visual Studio 2017 supports multiple instances installed on a single
machine.  We use the Visual Studio Installer tool to enumerate instances
and select one.  Once we select an instance for a given build tree, save
the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree
with the same instance on future re-runs of CMake.

Fixes: #17268
This commit is contained in:
Brad King
2017-10-04 13:01:47 -04:00
parent 17edfa4198
commit 9ffb35386f
16 changed files with 135 additions and 24 deletions
+5
View File
@@ -27,6 +27,11 @@ public:
virtual void WriteSLNHeader(std::ostream& fout);
virtual const char* GetToolsVersion() { return "15.0"; }
bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
bool GetVSInstance(std::string& dir) const;
protected:
bool InitializeWindows(cmMakefile* mf) override;
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;