summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudioVersionedGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-01 11:23:12 -0400
committerBrad King <brad.king@kitware.com>2019-10-01 11:39:38 -0400
commit5117389931e1c845d81a9b50382d42e0cfb46bdc (patch)
treec526e827ea6e08b2a582d05bac9abb159776737b /Source/cmGlobalVisualStudioVersionedGenerator.cxx
parent6fb747a01c27a2226fe4cbf77bc19e6d21286f81 (diff)
downloadcmake-5117389931e1c845d81a9b50382d42e0cfb46bdc.tar.gz
VS: Fix support for v142 toolset minor versions
When using `-T v142,version=14.22` the `.props` file location is different starting with version `14.20` than it was in `14.16` and below. Adapt the path based on the version. Fixes: #19779
Diffstat (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 2ba1affde0..1eca1f6003 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -390,7 +390,9 @@ std::string cmGlobalVisualStudioVersionedGenerator::GetAuxiliaryToolset() const
GetVSInstance(instancePath);
std::stringstream path;
path << instancePath;
- path << "/VC/Auxiliary/Build/";
+ path << "/VC/Auxiliary/Build";
+ path << (cmSystemTools::VersionCompareGreaterEq(version, "14.20") ? '.'
+ : '/');
path << version;
path << "/Microsoft.VCToolsVersion." << version << ".props";