summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-05 17:40:31 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-05 17:41:54 (GMT)
commit03b7b6cda1016dd16491f8051b45a5baa85f2282 (patch)
tree04bdcaeb02675b98f06587f84cbb20050403306d /Source/cmGlobalVisualStudio10Generator.cxx
parentff1fddb0bf40b8a7170d54ccdc9420c2d7190472 (diff)
downloadCMake-03b7b6cda1016dd16491f8051b45a5baa85f2282.zip
CMake-03b7b6cda1016dd16491f8051b45a5baa85f2282.tar.gz
CMake-03b7b6cda1016dd16491f8051b45a5baa85f2282.tar.bz2
cmGlobalGenerator: Call SetGeneratorToolset even for empty toolset
Move handling of an empty toolset name into the implementation of the method. This simplifies the VS 10 implementation of default toolset selection because it has one code path that is always called.
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 19aa52c..63c32f9 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -121,7 +121,10 @@ cmGlobalVisualStudio10Generator::SetGeneratorToolset(std::string const& ts,
cmMakefile* mf)
{
this->GeneratorToolset = ts;
- this->AddVSPlatformToolsetDefinition(mf);
+ if(const char* toolset = this->GetPlatformToolset())
+ {
+ mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET", toolset);
+ }
return true;
}
@@ -142,7 +145,6 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s,
return false;
}
}
- this->AddVSPlatformToolsetDefinition(mf);
return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf);
}
@@ -187,16 +189,6 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsStore(cmMakefile* mf)
}
//----------------------------------------------------------------------------
-void cmGlobalVisualStudio10Generator
-::AddVSPlatformToolsetDefinition(cmMakefile* mf) const
-{
- if(const char* toolset = this->GetPlatformToolset())
- {
- mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET", toolset);
- }
-}
-
-//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
{
fout << "Microsoft Visual Studio Solution File, Format Version 11.00\n";