mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
Merge topic 'vs-17.10' into release-3.29
d256581bb0VS: Fix '-T version=14.40' under VS 17.10 preview 13a7fbd04c8VS: Verify toolset version= field format more strictly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9271
This commit is contained in:
@@ -218,15 +218,25 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
|
||||
if (vcPlatformToolsetRegex.find(platformToolset) ||
|
||||
platformToolset == "Test Toolset"_s) {
|
||||
std::string versionToolset = this->GeneratorToolsetVersion;
|
||||
cmsys::RegularExpression versionToolsetRegex("^[0-9][0-9]\\.[0-9][0-9]");
|
||||
cmsys::RegularExpression versionToolsetRegex(
|
||||
"^([0-9][0-9])\\.([0-9])[0-9](\\.|$)");
|
||||
if (versionToolsetRegex.find(versionToolset)) {
|
||||
versionToolset = cmStrCat('v', versionToolset.erase(2, 1));
|
||||
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();
|
||||
}
|
||||
|
||||
if (!cmHasPrefix(versionToolset, platformToolset)) {
|
||||
if (versionToolset != platformToolset) {
|
||||
mf->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat("Generator\n"
|
||||
|
||||
Reference in New Issue
Block a user