summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 4dae479..99e9173 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -607,10 +607,26 @@ cmGlobalVisualStudio10Generator::GetPlatformToolsetVersionString() const
const char*
cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitecture() const
{
+ std::string const& hostArch =
+ this->GetPlatformToolsetHostArchitectureString();
+ if (hostArch.empty()) {
+ return nullptr;
+ }
+ return hostArch.c_str();
+}
+
+std::string const&
+cmGlobalVisualStudio10Generator::GetPlatformToolsetHostArchitectureString()
+ const
+{
if (!this->GeneratorToolsetHostArchitecture.empty()) {
- return this->GeneratorToolsetHostArchitecture.c_str();
+ return this->GeneratorToolsetHostArchitecture;
}
- return nullptr;
+ if (!this->DefaultPlatformToolsetHostArchitecture.empty()) {
+ return this->DefaultPlatformToolsetHostArchitecture;
+ }
+ static std::string const empty;
+ return empty;
}
const char* cmGlobalVisualStudio10Generator::GetPlatformToolsetCuda() const