summaryrefslogtreecommitdiffstats
path: root/Source/cmGetCMakePropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-12 16:53:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-02-12 16:53:04 (GMT)
commite6ae3c6ae0540de51b3d615aea3abd49ccc70a34 (patch)
tree09f74e0bf09b27dd51e95530cbee7783db3301bd /Source/cmGetCMakePropertyCommand.cxx
parentfc7e15691a870f8f5e199e615279c7eb4dba8f6f (diff)
parent7c3f637680ac0cdb6cec5e75ba4a9b188de5017b (diff)
downloadCMake-e6ae3c6ae0540de51b3d615aea3abd49ccc70a34.zip
CMake-e6ae3c6ae0540de51b3d615aea3abd49ccc70a34.tar.gz
CMake-e6ae3c6ae0540de51b3d615aea3abd49ccc70a34.tar.bz2
Merge topic 'use-cmRange'
7c3f6376 Convert loop into two algorithms. 8a399c8c Convert loop to the common pattern. abfca975 Move loop inside of condition. 0b61b86d Handle last element outside of the loop. e21f7829 cmTarget: Use a sorted vector in place of a set. 559dc155 cmSet: Replace loop with cmJoin. 0ea71932 cmFindBase: Replace loop with cmJoin on range. 9380e85f Convert loops to cmJoin algorithm with cmRange. bb10012f cmStringCommand: Accumulate with cmJoin and range adaptors. 0c12f1ea cmAlgorithms: Add a range adaptor and API for adjusting a range. 27c6f017 Use cmJoin to accumulate string ranges. 4e78ebbd cmAlgorithms: Add a Range container and adaptor method. 89102249 Replace common loop pattern with cmJoin 7b8725bf Convert loops populating maybe-empty content into the common pattern. 7ee56f03 Convert loops into the commonly used pattern. 0a4e5674 cmMacroCommand: Remove counting variable. ...
Diffstat (limited to 'Source/cmGetCMakePropertyCommand.cxx')
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index e193cf5..84c00ba 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,12 +34,7 @@ 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" )
@@ -52,16 +46,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
{