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-11-23 10:57:13 -05:00
committed by David Cole
parent 0499f93716
commit 00e96808aa
+5 -4
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;
}