VS: Add internal API to get platform toolset as string

This commit is contained in:
Brad King committed 2016-10-25 09:19:49 -04:00
1 parent 2a567c68ce
commit 584ab5285b
2 files changed
+11 -3

No files matched your search

+10 -3
View File
@@ -338,14 +338,21 @@ 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*
+1
View File
@@ -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;