Browse Source

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
Brad King 7 years ago
parent
commit
98e4fbdc06
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Source/cmGlobalVisualStudio10Generator.cxx

+ 1 - 0
Source/cmGlobalVisualStudio10Generator.cxx

@@ -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());