summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-10-26 04:19:46 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-10-26 04:19:46 (GMT)
commit499c10457282f44d954c8a7385cbf9f8c82d1b08 (patch)
tree545e4503322c5bcfa7609632b7abf0aafa69d60e
parent2b0f8c7de0c922c98753a3a13d251306aabc9bdb (diff)
downloadCMake-499c10457282f44d954c8a7385cbf9f8c82d1b08.zip
CMake-499c10457282f44d954c8a7385cbf9f8c82d1b08.tar.gz
CMake-499c10457282f44d954c8a7385cbf9f8c82d1b08.tar.bz2
CTest: Clear custom vectors before populating (#12383)
Important when calling ctest commands in a loop from a script. Each time Populate gets called, it uses the current definition of the variable. Without the clear, it was accumulating additional identical values each time through the loop.
-rw-r--r--Source/cmCTest.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 702ba10..2a2cac9 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2526,6 +2526,8 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def,
cmSystemTools::ExpandListArgument(dval, slist);
std::vector<std::string>::iterator it;
+ vec.clear();
+
for ( it = slist.begin(); it != slist.end(); ++it )
{
cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl);