summaryrefslogtreecommitdiffstats
path: root/Source/cmGlob.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlob.h')
-rw-r--r--Source/cmGlob.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlob.h b/Source/cmGlob.h
index 1cfa4f8..125cd73 100644
--- a/Source/cmGlob.h
+++ b/Source/cmGlob.h
@@ -38,11 +38,21 @@ public:
//! Return the list of files that matched.
std::vector<std::string>& GetFiles();
+ //! Set recurse to true to match subdirectories.
+ void RecurseOn() { this->SetRecurse(true); }
+ void RecurseOff() { this->SetRecurse(false); }
+ void SetRecurse(bool i) { m_Recurse = i; }
+ bool GetRecurse() { return m_Recurse; }
+
protected:
//! Process directory
void ProcessDirectory(std::string::size_type start,
const std::string& dir, bool dir_only);
+ //! Process last directory, but only when recurse flags is on. That is
+ // effectively like saying: /path/to/file/**/file
+ void RecurseDirectory(const std::string& dir, bool dir_only);
+
//! Escape all non-alphanumeric characters in pattern.
void Escape(int ch, char* buffer);
@@ -55,6 +65,7 @@ protected:
void AddExpression(const char* expr);
cmGlobInternal* m_Internals;
+ bool m_Recurse;
};