summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioVersionedGenerator.cxx
diff options
context:
space:
mode:
authorTommy Vercetti <7903172+tommyvct@users.noreply.github.com>2022-06-17 19:44:59 (GMT)
committerBrad King <brad.king@kitware.com>2022-06-21 14:56:42 (GMT)
commit80273514aa57003243e864567351727467c667c1 (patch)
tree52fb735ad584adf9866a5ed32789ea97053b3861 /Source/cmGlobalVisualStudioVersionedGenerator.cxx
parent27874273061fa74d3bcc860769fb1eae42eba0fe (diff)
downloadCMake-80273514aa57003243e864567351727467c667c1.zip
CMake-80273514aa57003243e864567351727467c667c1.tar.gz
CMake-80273514aa57003243e864567351727467c667c1.tar.bz2
VS: Prefer ARM64 MSBuild on Windows ARM64 host
Fixes: #23629
Diffstat (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index fb76f7a..b72fc4e 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -899,6 +899,14 @@ std::string cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommand()
std::string vs;
if (vsSetupAPIHelper.GetVSInstanceInfo(vs)) {
if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS17) {
+#if defined(_M_ARM64)
+ std::string msbuild_arm64 =
+ vs + "/MSBuild/Current/Bin/arm64/MSBuild.exe";
+ if (cmSystemTools::FileExists(msbuild_arm64)) {
+ return msbuild_arm64;
+ }
+#endif
+
msbuild = vs + "/MSBuild/Current/Bin/amd64/MSBuild.exe";
if (cmSystemTools::FileExists(msbuild)) {
return msbuild;