Sfoglia il codice sorgente

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`.
Brad King 1 anno fa
parent
commit
d256581bb0
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      Source/cmGlobalVisualStudio10Generator.cxx

+ 8 - 0
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();