Merge topic 'fix-13611-source-group-issues'

00e9680 CMake: source_group needs to check its own regex after its children (#13611)
This commit is contained in:
Brad King 2012-11-27 13:34:40 -05:00 committed by CMake Topic Stage
commit ccf23f295c
1 changed files with 5 additions and 4 deletions

View File

@ -182,10 +182,6 @@ cmSourceGroup *cmSourceGroup::MatchChildrenRegex(const char *name)
std::vector<cmSourceGroup>::iterator end = std::vector<cmSourceGroup>::iterator end =
this->Internal->GroupChildren.end(); this->Internal->GroupChildren.end();
if(this->MatchesRegex(name))
{
return this;
}
for(;iter!=end; ++iter) for(;iter!=end; ++iter)
{ {
cmSourceGroup *result = iter->MatchChildrenRegex(name); cmSourceGroup *result = iter->MatchChildrenRegex(name);
@ -194,6 +190,11 @@ cmSourceGroup *cmSourceGroup::MatchChildrenRegex(const char *name)
return result; return result;
} }
} }
if(this->MatchesRegex(name))
{
return this;
}
return 0; return 0;
} }