summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
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/cmFileCommand.cxx
parent2910c30dd5b0042f476110d63e9c300b4e2feb0d (diff)
downloadCMake-274535d36642e5615a3b8b1d098396759a9e09f9.zip
CMake-274535d36642e5615a3b8b1d098396759a9e09f9.tar.gz
CMake-274535d36642e5615a3b8b1d098396759a9e09f9.tar.bz2
ENH: Recurse subdirectories
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 49f79d1..018c605 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -41,7 +41,11 @@ bool cmFileCommand::InitialPass(std::vector<std::string> const& args)
}
else if ( subCommand == "GLOB" )
{
- return this->HandleGlobCommand(args);
+ return this->HandleGlobCommand(args, false);
+ }
+ else if ( subCommand == "GLOB_RECURSE" )
+ {
+ return this->HandleGlobCommand(args, true);
}
else if ( subCommand == "MAKE_DIRECTORY" )
{
@@ -135,7 +139,8 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
}
//----------------------------------------------------------------------------
-bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args)
+bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
+ bool recurse)
{
if ( args.size() < 2 )
{
@@ -150,6 +155,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args)
std::string variable = *i;
i++;
cmGlob g;
+ g.SetRecurse(recurse);
std::string output = "";
bool first = true;
for ( ; i != args.end(); ++i )