summaryrefslogtreecommitdiff
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-06 17:31:47 -0500
committerBrad King <brad.king@kitware.com>2014-03-08 13:05:31 -0500
commitfabf1fbabb4fc67844d5b2210e70a9829a59ff23 (patch)
tree9e40776ac9efdcb7b674f2e25f1d47f74b3b7baf /Source/cmGlobalUnixMakefileGenerator3.cxx
parenta6ae2ea72bc0d4149c2ff6118fcfd577e95c680d (diff)
downloadcmake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.tar.gz
stringapi: Use strings in target name
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0b37a07a1a..74b8e987a0 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -568,7 +568,7 @@ void cmGlobalUnixMakefileGenerator3
const char* makeProgram,
const char* /*projectName*/,
const char* /*projectDir*/,
- const char* targetName,
+ const std::string& targetName,
const char* /*config*/,
bool fast,
std::vector<std::string> const& makeOptions)
@@ -585,7 +585,7 @@ void cmGlobalUnixMakefileGenerator3
}
makeCommand.insert(makeCommand.end(),
makeOptions.begin(), makeOptions.end());
- if ( targetName && strlen(targetName))
+ if (!targetName.empty())
{
cmLocalUnixMakefileGenerator3 *lg;
if (this->LocalGenerators.size())
@@ -649,8 +649,7 @@ cmGlobalUnixMakefileGenerator3
}
// Don't emit the same rule twice (e.g. two targets with the same
// simple name)
- if(t->second->GetName() &&
- strlen(t->second->GetName()) &&
+ if(!t->second->GetName().empty() &&
emitted.insert(t->second->GetName()).second &&
// Handle user targets here. Global targets are handled in
// the local generator on a per-directory basis.
@@ -746,8 +745,7 @@ cmGlobalUnixMakefileGenerator3
{
continue;
}
- if (t->second->GetName()
- && strlen(t->second->GetName())
+ if (!t->second->GetName().empty()
&& ((t->second->GetType() == cmTarget::EXECUTABLE)
|| (t->second->GetType() == cmTarget::STATIC_LIBRARY)
|| (t->second->GetType() == cmTarget::SHARED_LIBRARY)
@@ -975,7 +973,7 @@ cmGlobalUnixMakefileGenerator3::ProgressMapCompare
::operator()(cmTarget const* l, cmTarget const* r) const
{
// Order by target name.
- if(int c = strcmp(l->GetName(), r->GetName()))
+ if(int c = strcmp(l->GetName().c_str(), r->GetName().c_str()))
{
return c < 0;
}