summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-07 19:04:49 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-07 19:04:49 (GMT)
commit4777e82a0a47fcaa46e4e61b91273b9a993f88de (patch)
tree848b6212f06d3cafea98b4e5fcff369402fa8464 /Source/cmLocalGenerator.cxx
parentff95e44264571b9a53e5174a827877102952a2dd (diff)
parent2583eff6fe34f219a017c973c9e3bf12eb503178 (diff)
downloadCMake-4777e82a0a47fcaa46e4e61b91273b9a993f88de.zip
CMake-4777e82a0a47fcaa46e4e61b91273b9a993f88de.tar.gz
CMake-4777e82a0a47fcaa46e4e61b91273b9a993f88de.tar.bz2
Merge topic 'dev/refactor-source-depends-in-ninja'
2583eff6 ninja: Factor out custom command order-only depends 18e478a8 ninja: Factor out target-level order-only dependencies 6fa6bedf LocalGenerator: Add a string overload for AppendFlags 01b79c63 ninja: Don't use a stringstream to build an argument list 3c640891 ninja: Use string parameters
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c4c6428..209900f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2214,7 +2214,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,
@@ -2398,11 +2398,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 += " ";
@@ -2412,10 +2411,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));
}
//----------------------------------------------------------------------------