summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
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 )