summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioVersionedGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-20 16:01:53 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-20 17:00:25 (GMT)
commit6999b871335c26d9d39b05023559254b1437bcf5 (patch)
tree0840adbe902564d85f75cbf92d4fe5a29124bb1c /Source/cmGlobalVisualStudioVersionedGenerator.cxx
parent7f730464be485862ba89c85248306c893117a595 (diff)
downloadCMake-6999b871335c26d9d39b05023559254b1437bcf5.zip
CMake-6999b871335c26d9d39b05023559254b1437bcf5.tar.gz
CMake-6999b871335c26d9d39b05023559254b1437bcf5.tar.bz2
cmGlobalVisualStudio10Generator: Add method to find MSBuild early
Add a way to find MSBuild before the main `FindMakeProgram` code path has executed.
Diffstat (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index b6219a6..ec2e74f 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -718,6 +718,17 @@ cmGlobalVisualStudioVersionedGenerator::GetWindows10SDKMaxVersionDefault(
return std::string();
}
+cm::optional<std::string>
+cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommandEarly(cmMakefile* mf)
+{
+ std::string instance = mf->GetSafeDefinition("CMAKE_GENERATOR_INSTANCE");
+ if (!this->SetGeneratorInstance(instance, mf)) {
+ cmSystemTools::SetFatalErrorOccured();
+ return {};
+ }
+ return this->cmGlobalVisualStudio14Generator::FindMSBuildCommandEarly(mf);
+}
+
std::string cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommand()
{
std::string msbuild;