summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 7af971e..793c605 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -339,13 +339,20 @@ void cmGlobalVisualStudio10Generator::EnableLanguage(
const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const
{
+ return this->GetPlatformToolsetString().c_str();
+}
+
+std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString()
+ const
+{
if (!this->GeneratorToolset.empty()) {
- return this->GeneratorToolset.c_str();
+ return this->GeneratorToolset;
}
if (!this->DefaultPlatformToolset.empty()) {
- return this->DefaultPlatformToolset.c_str();
+ return this->DefaultPlatformToolset;
}
- return 0;
+ static std::string const empty;
+ return empty;
}
const char*