summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorNicholas Sinlock <nsinlock@microsoft.com>2022-09-01 21:43:19 (GMT)
committerNicholas Sinlock <nsinlock@microsoft.com>2022-09-02 21:41:37 (GMT)
commitf972e4fd3acfb33888102ddc84b4e96db20998df (patch)
tree11552d663bca9daaea784ad6915ef75f7f511001 /Source/cmGlobalVisualStudio10Generator.cxx
parent01e95efc34a2a9bcf9910d65d3b38ff9b8a51750 (diff)
downloadCMake-f972e4fd3acfb33888102ddc84b4e96db20998df.zip
CMake-f972e4fd3acfb33888102ddc84b4e96db20998df.tar.gz
CMake-f972e4fd3acfb33888102ddc84b4e96db20998df.tar.bz2
cmVSGenerator: Add support for two-part toolset versions for Visual Studio
Enables the Global Visual Studio Versioned Generator to use two-part toolset versions, if only one toolset has that version number. For example, (14.32 is specified when 14.32.32142 and 14.32.23242 are installed). This change also add a unique return code and message if a two-part version is used when multiple matching versions are present. Fixes: #23933
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 29eeb5a..7886fc7 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -389,6 +389,27 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
this->GeneratorToolsetVersion.clear();
this->GeneratorToolsetVersionProps = {};
} break;
+ case AuxToolset::PropsIndeterminate: {
+ std::ostringstream e;
+ /* clang-format off */
+ e <<
+ "Generator\n"
+ " " << this->GetName() << "\n"
+ "given toolset and version specification\n"
+ " " << this->GetPlatformToolsetString() << ",version=" <<
+ this->GeneratorToolsetVersion << "\n"
+ "has multiple matches installed at\n" <<
+ " " << auxProps << "\n" <<
+ "The toolset and version specification must resolve \n" <<
+ "to a single installed toolset";
+ ;
+ /* clang-format on */
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
+
+ // Clear the configured tool-set
+ this->GeneratorToolsetVersion.clear();
+ this->GeneratorToolsetVersionProps = {};
+ } break;
}
}