diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmOutputRequiredFilesCommand.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 98dfabc..831601d 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -199,6 +199,13 @@ bool cmOutputRequiredFilesCommand { // write them out FILE *fout = fopen(this->OutputFile.c_str(),"w"); + if(!fout) + { + std::string err = "Can not open output file: "; + err += this->OutputFile; + this->SetError(err.c_str()); + return false; + } std::set<cmDependInformation const*> visited; this->ListDependencies(info,fout, &visited); fclose(fout); |