summaryrefslogtreecommitdiffstats
path: root/Source/cmGlob.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-14 13:15:13 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-14 13:15:13 (GMT)
commit274535d36642e5615a3b8b1d098396759a9e09f9 (patch)
treefdce84aed2f10ca0b68447fba707708dc5d11ad7 /Source/cmGlob.h
parent2910c30dd5b0042f476110d63e9c300b4e2feb0d (diff)
downloadCMake-274535d36642e5615a3b8b1d098396759a9e09f9.zip
CMake-274535d36642e5615a3b8b1d098396759a9e09f9.tar.gz
CMake-274535d36642e5615a3b8b1d098396759a9e09f9.tar.bz2
ENH: Recurse subdirectories
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;
};