From 00e96808aa3729a6b385818643249ea2130cbef1 Mon Sep 17 00:00:00 2001 From: Clemens Heppner Date: Sun, 28 Oct 2012 09:54:26 +0100 Subject: 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. --- Source/cmSourceGroup.cxx | 9 +++++---- 1 file 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::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; } -- cgit v0.12