diff options
author | Brad King <brad.king@kitware.com> | 2019-01-24 16:19:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-24 18:49:25 (GMT) |
commit | 626c51f47be79c5438cc349f51ba1b4973194bfc (patch) | |
tree | 2b7a43b80a1cede0c6caa59e6221d08b0efcc775 /Source/cmVSSetupHelper.cxx | |
parent | fd45cbf40ee809d6b900f22247fef06e3d349c78 (diff) | |
download | CMake-626c51f47be79c5438cc349f51ba1b4973194bfc.zip CMake-626c51f47be79c5438cc349f51ba1b4973194bfc.tar.gz CMake-626c51f47be79c5438cc349f51ba1b4973194bfc.tar.bz2 |
VS: Update for Visual Studio 2019 Preview 2
The toolset is now called `v142`. Use matching flag tables.
Fixes: #18834
Diffstat (limited to 'Source/cmVSSetupHelper.cxx')
-rw-r--r-- | Source/cmVSSetupHelper.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 9187c29..91a0e15 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -188,8 +188,16 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( // Check if a compiler is installed with this instance. { std::string const vcRoot = vsInstanceInfo.GetInstallLocation(); - std::string const vcToolsVersionFile = + std::string vcToolsVersionFile = vcRoot + "/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt"; + if (!cmSystemTools::PathExists(vcToolsVersionFile)) { + // FIXME: VS 2019 Preview 2 installs the v142 toolset and does not + // provide the plain `Microsoft.VCToolsVersion.default.txt` that v141 + // does. This should be fixed in preview 3 and this workaround can + // be dropped. Otherwise, we may need to switch to globbing. + vcToolsVersionFile = vcRoot + + "/VC/Auxiliary/Build/Microsoft.VCToolsVersion.v142.default.txt"; + } std::string vcToolsVersion; cmsys::ifstream fin(vcToolsVersionFile.c_str()); if (!fin || !cmSystemTools::GetLineFromStream(fin, vcToolsVersion)) { |