diff options
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r-- | Source/cmGetPropertyCommand.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index c110161..93c724a 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -328,15 +328,9 @@ bool cmGetPropertyCommand::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) + if(cmTest* test = this->Makefile->GetTest(this->Name.c_str())) { - cmTest* test = *ti; - if(test->GetName() == this->Name) - { - return this->StoreResult(test->GetProperty(this->PropertyName.c_str())); - } + return this->StoreResult(test->GetProperty(this->PropertyName.c_str())); } // If not found it is an error. |