summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-04 17:01:47 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-19 14:20:12 (GMT)
commit9ffb35386fb923a5959eec482bfa131aa3feaa18 (patch)
treea01b2cc99c387db8f4ef234d70ff35de43009b70 /Source/cmVSSetupHelper.cxx
parent17edfa41983c61574e897eda923c90fd33ba8ac3 (diff)
downloadCMake-9ffb35386fb923a5959eec482bfa131aa3feaa18.zip
CMake-9ffb35386fb923a5959eec482bfa131aa3feaa18.tar.gz
CMake-9ffb35386fb923a5959eec482bfa131aa3feaa18.tar.bz2
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
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r--Source/cmVSSetupHelper.cxx7
1 files changed, 0 insertions, 7 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index 4f5f4e8..c2f8deb 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -273,13 +273,6 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
if (cmSystemTools::GetEnv("VS150COMNTOOLS", envVSCommonToolsDir)) {
cmSystemTools::ConvertToUnixSlashes(envVSCommonToolsDir);
}
- // FIXME: If the environment variable value changes between runs
- // of CMake within a given build tree the results are not defined.
- // Instead we should save a CMAKE_GENERATOR_INSTANCE value in the cache
- // (similar to CMAKE_GENERATOR_TOOLSET) to hold it persistently.
- // Unfortunately doing so will require refactoring elsewhere in
- // order to make sure the value is available in time to create
- // the generator.
std::vector<VSInstanceInfo> vecVSInstances;
SmartCOMPtr<IEnumSetupInstances> enumInstances = NULL;