diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-05-01 20:07:26 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-05-07 18:30:31 (GMT) |
commit | 6fa6bedf78981d336b66d55ca10a1d290d014101 (patch) | |
tree | 01bcbe86eede14cc94f84e2ae0293652e82319db /Source/cmLocalGenerator.cxx | |
parent | 01b79c6385d32e635b5720d8075a60fd50577c66 (diff) | |
download | CMake-6fa6bedf78981d336b66d55ca10a1d290d014101.zip CMake-6fa6bedf78981d336b66d55ca10a1d290d014101.tar.gz CMake-6fa6bedf78981d336b66d55ca10a1d290d014101.tar.bz2 |
LocalGenerator: Add a string overload for AppendFlags
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f375b5f..6b16721 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2200,7 +2200,7 @@ static void AddVisibilityCompileOption(std::string &flags, cmTarget* target, return; } std::string option = std::string(opt) + prop; - lg->AppendFlags(flags, option.c_str()); + lg->AppendFlags(flags, option); } static void AddInlineVisibilityCompileOption(std::string &flags, @@ -2384,11 +2384,10 @@ void cmLocalGenerator::AddConfigVariableFlags(std::string& flags, //---------------------------------------------------------------------------- void cmLocalGenerator::AppendFlags(std::string& flags, - const char* newFlags) + const std::string& newFlags) { - if(newFlags && *newFlags) + if(!newFlags.empty()) { - std::string newf = newFlags; if(flags.size()) { flags += " "; @@ -2398,10 +2397,20 @@ void cmLocalGenerator::AppendFlags(std::string& flags, } //---------------------------------------------------------------------------- +void cmLocalGenerator::AppendFlags(std::string& flags, + const char* newFlags) +{ + if(newFlags && *newFlags) + { + this->AppendFlags(flags, std::string(newFlags)); + } +} + +//---------------------------------------------------------------------------- void cmLocalGenerator::AppendFlagEscape(std::string& flags, const std::string& rawFlag) { - this->AppendFlags(flags, this->EscapeForShell(rawFlag).c_str()); + this->AppendFlags(flags, this->EscapeForShell(rawFlag)); } //---------------------------------------------------------------------------- |