1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00

cmGlobalVisualStudioVersionedGenerator: Clarify local variable name

This commit is contained in:
Brad King
2021-03-12 06:33:51 -05:00
parent acdbf64047
commit 09f59da7f0

View File

@@ -302,16 +302,16 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
// If a specific minor version of the toolset was requested, verify that it
// is compatible to the major version and that is exists on disk.
// If not clear the value.
std::string version = this->GeneratorToolsetVersion;
std::string versionToolset = this->GeneratorToolsetVersion;
cmsys::RegularExpression regex("[0-9][0-9]\\.[0-9][0-9]");
if (regex.find(version)) {
version = "v" + version.erase(2, 1);
if (regex.find(versionToolset)) {
versionToolset = "v" + versionToolset.erase(2, 1);
} else {
// Version not recognized. Clear it.
version.clear();
versionToolset.clear();
}
if (!cmHasPrefix(version, this->GetPlatformToolsetString())) {
if (!cmHasPrefix(versionToolset, this->GetPlatformToolsetString())) {
std::ostringstream e;
/* clang-format off */
e <<