summaryrefslogtreecommitdiffstats
path: root/Source/cmOutputRequiredFilesCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-01-23 15:28:26 (GMT)
committerKen Martin <ken.martin@kitware.com>2008-01-23 15:28:26 (GMT)
commit0e69d38004787f1d55eb7188cde4cf45e0a3957d (patch)
tree6cde7d0b5ef4b0b9b6d4fc90db463418e073776b /Source/cmOutputRequiredFilesCommand.cxx
parent72a301f88008c3d98c4ae1f263084763dc662b31 (diff)
downloadCMake-0e69d38004787f1d55eb7188cde4cf45e0a3957d.zip
CMake-0e69d38004787f1d55eb7188cde4cf45e0a3957d.tar.gz
CMake-0e69d38004787f1d55eb7188cde4cf45e0a3957d.tar.bz2
ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx34
1 files changed, 16 insertions, 18 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index e15fea2..98dfabc 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -177,7 +177,7 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
// cmOutputRequiredFilesCommand
bool cmOutputRequiredFilesCommand
-::InitialPass(std::vector<std::string> const& args)
+::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() != 2 )
{
@@ -189,6 +189,21 @@ bool cmOutputRequiredFilesCommand
this->File = args[0];
this->OutputFile = args[1];
+ // compute the list of files
+ cmLBDepend md;
+ md.SetMakefile(this->Makefile);
+ md.AddSearchPath(this->Makefile->GetStartDirectory());
+ // find the depends for a file
+ const cmDependInformation *info = md.FindDependencies(this->File.c_str());
+ if (info)
+ {
+ // write them out
+ FILE *fout = fopen(this->OutputFile.c_str(),"w");
+ std::set<cmDependInformation const*> visited;
+ this->ListDependencies(info,fout, &visited);
+ fclose(fout);
+ }
+
return true;
}
@@ -221,20 +236,3 @@ ListDependencies(cmDependInformation const *info,
}
}
-void cmOutputRequiredFilesCommand::FinalPass()
-{
- // compute the list of files
- cmLBDepend md;
- md.SetMakefile(this->Makefile);
- md.AddSearchPath(this->Makefile->GetStartDirectory());
- // find the depends for a file
- const cmDependInformation *info = md.FindDependencies(this->File.c_str());
- if (info)
- {
- // write them out
- FILE *fout = fopen(this->OutputFile.c_str(),"w");
- std::set<cmDependInformation const*> visited;
- this->ListDependencies(info,fout, &visited);
- fclose(fout);
- }
-}