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:
parent
0499f93716
commit
00e96808aa
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue