| 1002 | } |
| 1003 | |
| 1004 | std::string cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommand() |
| 1005 | { |
| 1006 | std::string msbuild; |
| 1007 | |
| 1008 | // Ask Visual Studio Installer tool. |
| 1009 | std::string vs; |
| 1010 | if (vsSetupAPIHelper.GetVSInstanceInfo(vs)) { |
| 1011 | if (this->Version >= cmGlobalVisualStudioGenerator::VSVersion::VS17) { |
| 1012 | if (VSIsArm64Host()) { |
| 1013 | if (VSHasDotNETFrameworkArm64()) { |
| 1014 | msbuild = cmStrCat(vs, "/MSBuild/Current/Bin/arm64/MSBuild.exe"); |
| 1015 | if (cmSystemTools::FileExists(msbuild)) { |
| 1016 | return msbuild; |
| 1017 | } |
| 1018 | } |
| 1019 | if (VSIsWindows11OrGreater()) { |
| 1020 | msbuild = cmStrCat(vs, "/MSBuild/Current/Bin/amd64/MSBuild.exe"); |
| 1021 | if (cmSystemTools::FileExists(msbuild)) { |
| 1022 | return msbuild; |
| 1023 | } |
| 1024 | } |
| 1025 | } else { |
| 1026 | msbuild = cmStrCat(vs, "/MSBuild/Current/Bin/amd64/MSBuild.exe"); |
| 1027 | if (cmSystemTools::FileExists(msbuild)) { |
| 1028 | return msbuild; |
| 1029 | } |
| 1030 | } |
| 1031 | } |
| 1032 | msbuild = cmStrCat(vs, "/MSBuild/Current/Bin/MSBuild.exe"); |
| 1033 | if (cmSystemTools::FileExists(msbuild)) { |
| 1034 | return msbuild; |
| 1035 | } |
| 1036 | msbuild = cmStrCat(vs, "/MSBuild/15.0/Bin/MSBuild.exe"); |
| 1037 | if (cmSystemTools::FileExists(msbuild)) { |
| 1038 | return msbuild; |
| 1039 | } |
| 1040 | } |
| 1041 | |
| 1042 | msbuild = "MSBuild.exe"; |
| 1043 | return msbuild; |
| 1044 | } |
| 1045 | |
| 1046 | std::string cmGlobalVisualStudioVersionedGenerator::FindDevEnvCommand() |
| 1047 | { |
nothing calls this directly
no test coverage detected