VS: Pass platform when invoking MSBuild

MSBuild expects a `/p:Platform=...` argument to tell it which platform
to build among those in the `.vcxproj` files.  We have not historically
had to do this because we generate only one platform.  However, when
a project uses `include_external_msproject` the included project file
may have other platforms.

Fixes: #18308
This commit is contained in:
Brad King
2018-09-25 13:25:36 -04:00
parent 6597428c36
commit 98e4fbdc06

View File

@@ -938,6 +938,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
configArg += "Debug";
}
makeCommand.push_back(configArg);
makeCommand.push_back("/p:Platform=" + this->GetPlatformName());
makeCommand.push_back(std::string("/p:VisualStudioVersion=") +
this->GetIDEVersion());