diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-10 14:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-10 14:55:09 (GMT) |
commit | a6cd48ac414238f922999e9ea457f1bc86c35163 (patch) | |
tree | dfd2d3958de911985f7f8051028def90bf32b154 /Source/cmGhsMultiTargetGenerator.cxx | |
parent | c06e0356017beef41cd2bb57a6cebfb242a9128e (diff) | |
download | CMake-a6cd48ac414238f922999e9ea457f1bc86c35163.zip CMake-a6cd48ac414238f922999e9ea457f1bc86c35163.tar.gz CMake-a6cd48ac414238f922999e9ea457f1bc86c35163.tar.bz2 |
Source: use std::string overloads
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 5e2248e..388e893 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -180,15 +180,12 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, auto i = this->FlagsByLanguage.find(language); if (i == this->FlagsByLanguage.end()) { std::string flags; - const char* lang = language.c_str(); - - this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, lang, - config); - - this->LocalGenerator->AddCMP0018Flags(flags, this->GeneratorTarget, lang, - config); + this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, + language, config); + this->LocalGenerator->AddCMP0018Flags(flags, this->GeneratorTarget, + language, config); this->LocalGenerator->AddVisibilityPresetFlags( - flags, this->GeneratorTarget, lang); + flags, this->GeneratorTarget, language); // Append old-style preprocessor definition flags. if (this->Makefile->GetDefineFlags() != " ") { @@ -197,8 +194,8 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, } // Add target-specific flags. - this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, lang, - config); + this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, + language, config); std::map<std::string, std::string>::value_type entry(language, flags); i = this->FlagsByLanguage.insert(entry).first; @@ -211,13 +208,12 @@ std::string cmGhsMultiTargetGenerator::GetDefines(const std::string& language, auto i = this->DefinesByLanguage.find(language); if (i == this->DefinesByLanguage.end()) { std::set<std::string> defines; - const char* lang = language.c_str(); // Add preprocessor definitions for this target and configuration. this->LocalGenerator->GetTargetDefines(this->GeneratorTarget, config, language, defines); std::string definesString; - this->LocalGenerator->JoinDefines(defines, definesString, lang); + this->LocalGenerator->JoinDefines(defines, definesString, language); std::map<std::string, std::string>::value_type entry(language, definesString); |