summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceGroup.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSourceGroup.cxx')
-rw-r--r--Source/cmSourceGroup.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 155068cb..6019de1 100644
--- a/Source/cmSourceGroup.cxx
+++ b/Source/cmSourceGroup.cxx
@@ -124,6 +124,21 @@ cmSourceGroup* cmSourceGroup::MatchChildrenFiles(const std::string& name)
return nullptr;
}
+const cmSourceGroup* cmSourceGroup::MatchChildrenFiles(
+ const std::string& name) const
+{
+ if (this->MatchesFiles(name)) {
+ return this;
+ }
+ for (const cmSourceGroup& group : this->Internal->GroupChildren) {
+ const cmSourceGroup* result = group.MatchChildrenFiles(name);
+ if (result) {
+ return result;
+ }
+ }
+ return nullptr;
+}
+
cmSourceGroup* cmSourceGroup::MatchChildrenRegex(const std::string& name)
{
for (cmSourceGroup& group : this->Internal->GroupChildren) {