BUG: fix for 5071, report error if output file can not be opened
This commit is contained in:
parent
4e6e9e8335
commit
ada0f98e91
@ -199,6 +199,13 @@ bool cmOutputRequiredFilesCommand
|
|||||||
{
|
{
|
||||||
// write them out
|
// write them out
|
||||||
FILE *fout = fopen(this->OutputFile.c_str(),"w");
|
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;
|
std::set<cmDependInformation const*> visited;
|
||||||
this->ListDependencies(info,fout, &visited);
|
this->ListDependencies(info,fout, &visited);
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user