summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-01 17:48:32 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-01 17:48:32 (GMT)
commitfb97ba629348cdc93ac26ce7c8ed8804a7a9fae3 (patch)
tree798dbde696e47d0da3f258f4042b1cdff79056e9 /Source/cmVisualStudio10TargetGenerator.cxx
parent5cf99388c3cf48e89c576b6f93af96fb4111be03 (diff)
downloadCMake-fb97ba629348cdc93ac26ce7c8ed8804a7a9fae3.zip
CMake-fb97ba629348cdc93ac26ce7c8ed8804a7a9fae3.tar.gz
CMake-fb97ba629348cdc93ac26ce7c8ed8804a7a9fae3.tar.bz2
Enable 64-bit tools with VS 2010 Express (#9981, #10722)
The Express Edition does not come with 64-bit tools, but one can install the "Microsoft Windows SDK v7.1" to get them. Detect this case and check for the SDK. If found, set PlatformToolset to use the SDK tools. Otherwise, fail with a concise and informative error.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 524be8b..8e55a0f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -244,6 +244,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurations()
void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
{
+ cmGlobalVisualStudio10Generator* gg =
+ static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
@@ -291,6 +293,13 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
{
this->WriteString("<CharacterSet>MultiByte</CharacterSet>\n", 2);
}
+ if(const char* toolset = gg->GetPlatformToolset())
+ {
+ std::string pts = "<PlatformToolset>";
+ pts += toolset;
+ pts += "</PlatformToolset>\n";
+ this->WriteString(pts.c_str(), 2);
+ }
this->WriteString("</PropertyGroup>\n", 1);
}
}