summaryrefslogtreecommitdiff
path: root/Source/cmSourceGroup.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSourceGroup.cxx')
-rw-r--r--Source/cmSourceGroup.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 4fd98518b..f09976f44 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;
}