summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorClemens Heppner <ch@cheppner.de>2012-10-28 08:54:26 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-11-23 15:57:13 (GMT)
commit00e96808aa3729a6b385818643249ea2130cbef1 (patch)
treeb0dc15def657b694f9d6d8833bbb96d682720405 /Source
parent0499f93716602ba906e292f279e215f4a8e92a01 (diff)
downloadCMake-00e96808aa3729a6b385818643249ea2130cbef1.zip
CMake-00e96808aa3729a6b385818643249ea2130cbef1.tar.gz
CMake-00e96808aa3729a6b385818643249ea2130cbef1.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSourceGroup.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 4fd9851..f09976f 100644
--- a/Source/cmSourceGroup.cxx
+++ b/Source/cmSourceGroup.cxx
@@ -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;
}