From b1eb493c11f38f651c2a8f0489918f3a55feeb99 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 5 Apr 2017 14:54:02 -0400 Subject: cmGlobalGenerator: Abort generation earlier on export() error --- Source/cmGlobalGenerator.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ce83e2e..a9243eb 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1347,10 +1347,11 @@ void cmGlobalGenerator::Generate() for (std::map::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; } } -- cgit v0.12