diff options
author | Brad King <brad.king@kitware.com> | 2016-10-18 14:09:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-25 13:19:49 (GMT) |
commit | 584ab5285b51945e0dd523caf77342985ac97ce4 (patch) | |
tree | f11b7a945bf8dfd42e9d86bd3fa06e52e4334bae /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | 2a567c68ce6605071f3e21638560493b71ed2841 (diff) | |
download | CMake-584ab5285b51945e0dd523caf77342985ac97ce4.zip CMake-584ab5285b51945e0dd523caf77342985ac97ce4.tar.gz CMake-584ab5285b51945e0dd523caf77342985ac97ce4.tar.bz2 |
VS: Add internal API to get platform toolset as string
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 13 |
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* |