diff options
Diffstat (limited to 'Source/cmSetPropertyCommand.cxx')
-rw-r--r-- | Source/cmSetPropertyCommand.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 9d00e32..b683fe7 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -327,15 +327,14 @@ bool cmSetPropertyCommand::HandleSource(cmSourceFile* sf) //---------------------------------------------------------------------------- bool cmSetPropertyCommand::HandleTestMode() { - // Loop over all tests looking for matching names. - std::vector<cmTest*> const& tests = *this->Makefile->GetTests(); - for(std::vector<cmTest*>::const_iterator ti = tests.begin(); - ti != tests.end(); ++ti) - { - cmTest* test = *ti; - std::set<cmStdString>::iterator ni = - this->Names.find(test->GetName()); - if(ni != this->Names.end()) + // Look for tests with all names given. + std::set<cmStdString>::iterator next; + for(std::set<cmStdString>::iterator ni = this->Names.begin(); + ni != this->Names.end(); ni = next) + { + next = ni; + ++next; + if(cmTest* test = this->Makefile->GetTest(ni->c_str())) { if(this->HandleTest(test)) { |