summaryrefslogtreecommitdiffstats
path: root/Source/cmGetCMakePropertyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGetCMakePropertyCommand.cxx')
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx20
1 files changed, 3 insertions, 17 deletions
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index e193cf5..fd18596 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -25,7 +25,6 @@ bool cmGetCMakePropertyCommand
return false;
}
- std::vector<std::string>::size_type cc;
std::string variable = args[0];
std::string output = "NOTFOUND";
@@ -35,16 +34,12 @@ bool cmGetCMakePropertyCommand
std::vector<std::string> vars = this->Makefile->GetDefinitions(cacheonly);
if (!vars.empty())
{
- output = vars[0];
- }
- for ( cc = 1; cc < vars.size(); ++cc )
- {
- output += ";";
- output += vars[cc];
+ output = cmJoin(vars, ";");
}
}
else if ( args[1] == "MACROS" )
{
+ output.clear();
this->Makefile->GetListOfMacros(output);
}
else if ( args[1] == "COMPONENTS" )
@@ -52,16 +47,7 @@ bool cmGetCMakePropertyCommand
const std::set<std::string>* components
= this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
->GetInstallComponents();
- std::set<std::string>::const_iterator compIt;
- output = "";
- for (compIt = components->begin(); compIt != components->end(); ++compIt)
- {
- if (compIt != components->begin())
- {
- output += ";";
- }
- output += *compIt;
- }
+ output = cmJoin(*components, ";");
}
else
{