summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-19 16:51:25 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-20 11:23:34 (GMT)
commitd256581bb08799741f9a5221396a5b38b44b3f54 (patch)
tree3f7add87c54022c3c99dae9f1971364f0d36751a /Source
parent3a7fbd04c8acb89cd14186930aa80f08c08bada0 (diff)
downloadCMake-d256581bb08799741f9a5221396a5b38b44b3f54.zip
CMake-d256581bb08799741f9a5221396a5b38b44b3f54.tar.gz
CMake-d256581bb08799741f9a5221396a5b38b44b3f54.tar.bz2
VS: Fix '-T version=14.40' under VS 17.10 preview 1
VS 17.10 preview 1 comes with toolset `v143` version `14.40`. This is the first time that the first three digits of the version do not match the toolset name. Add a special case to map version `14.40` back to toolset `v143`.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 09679cd..91fbccc 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -223,6 +223,14 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
if (versionToolsetRegex.find(versionToolset)) {
versionToolset = cmStrCat('v', versionToolsetRegex.match(1),
versionToolsetRegex.match(2));
+ // Hard-code special cases for toolset versions whose first
+ // three digits do not match their toolset name.
+ if (platformToolset == "v143"_s && versionToolset == "v144"_s &&
+ // VS 17.10 toolset v143 version 14.40.
+ (this->GeneratorToolsetVersion == "14.40"_s ||
+ cmHasLiteralPrefix(this->GeneratorToolsetVersion, "14.40."))) {
+ versionToolset = "v143";
+ }
} else {
// Version not recognized. Clear it.
versionToolset.clear();