ENH: Add relative tag and add test for relative tag

This commit is contained in:
Andy Cedilnik
2006-03-21 16:03:19 -05:00
parent 9dbf4438dc
commit d41f97a5e6
3 changed files with 20 additions and 4 deletions
+11
View File
@@ -210,6 +210,17 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
bool first = true;
for ( ; i != args.end(); ++i )
{
if ( *i == "RELATIVE" )
{
++i; // skip RELATIVE
if ( i == args.end() )
{
this->SetError("GLOB requires a directory after the RELATIVE tag");
return false;
}
g.SetRelative(i->c_str());
++i;
}
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
{
std::string expr = this->Makefile->GetCurrentDirectory();