cmGlobalGenerator: Abort generation earlier on export() error

This commit is contained in:
Brad King committed 2017-04-11 11:40:14 -04:00
1 parent 0419ecbcad
commit b1eb493c11
1 file changed
+5 -4
+5 -4
View File
@@ -1347,10 +1347,11 @@ void cmGlobalGenerator::Generate()
for (std::map<std::string, cmExportBuildFileGenerator*>::iterator it =
this->BuildExportSets.begin();
it != this->BuildExportSets.end(); ++it) {
if (!it->second->GenerateImportFile() &&
!cmSystemTools::GetErrorOccuredFlag()) {
this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR,
"Could not write export file.");
if (!it->second->GenerateImportFile()) {
if (!cmSystemTools::GetErrorOccuredFlag()) {
this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR,
"Could not write export file.");
}
return;
}
}