summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-25 17:25:36 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-25 17:27:13 (GMT)
commit98e4fbdc063ea738f1f2fa38028be14492297d0f (patch)
treed83fae34d4569799993d27169f1375a05d0d16fc /Source/cmGlobalVisualStudio10Generator.cxx
parent6597428c364c0a495bba88a6154ac0ed7f3cd461 (diff)
downloadCMake-98e4fbdc063ea738f1f2fa38028be14492297d0f.zip
CMake-98e4fbdc063ea738f1f2fa38028be14492297d0f.tar.gz
CMake-98e4fbdc063ea738f1f2fa38028be14492297d0f.tar.bz2
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
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 5ea323a..82fcaad 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/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());