diff options
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r-- | Source/cmOutputRequiredFilesCommand.cxx | 34 |
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); - } -} |