summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx13
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h1
2 files changed, 11 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*
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 62b8661..ba07a5b 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -48,6 +48,7 @@ public:
/** The toolset name for the target platform. */
const char* GetPlatformToolset() const;
+ std::string const& GetPlatformToolsetString() const;
/** The toolset host architecture name (e.g. x64 for 64-bit host tools). */
const char* GetPlatformToolsetHostArchitecture() const;