CMake: source_group needs to check its own regex after its children (#13611)

Otherwise, regexes that descend into sub-folders do not get grouped correctly.
This commit is contained in:
Clemens Heppner 2012-10-28 09:54:26 +01:00 committed by David Cole
parent 0499f93716
commit 00e96808aa
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 =
this->Internal->GroupChildren.end();
if(this->MatchesRegex(name))
{
return this;
}
for(;iter!=end; ++iter)
{
cmSourceGroup *result = iter->MatchChildrenRegex(name);
@ -194,6 +190,11 @@ cmSourceGroup *cmSourceGroup::MatchChildrenRegex(const char *name)
return result;
}
}
if(this->MatchesRegex(name))
{
return this;
}
return 0;
}