Merge topic 'ninja-error-failbit'

b94514f Ninja: mark rules/build file streams failed if error occurred (#13067, #13105)
This commit is contained in:
David Cole 2012-05-17 15:00:01 -04:00 committed by CMake Topic Stage
commit 8e9929d527
1 changed files with 5 additions and 0 deletions

View File

@ -385,6 +385,11 @@ void cmGlobalNinjaGenerator::Generate()
this->WriteTargetAliases(*this->BuildFileStream); this->WriteTargetAliases(*this->BuildFileStream);
this->WriteBuiltinTargets(*this->BuildFileStream); this->WriteBuiltinTargets(*this->BuildFileStream);
if (cmSystemTools::GetErrorOccuredFlag()) {
this->RulesFileStream->setstate(std::ios_base::failbit);
this->BuildFileStream->setstate(std::ios_base::failbit);
}
this->CloseRulesFileStream(); this->CloseRulesFileStream();
this->CloseBuildFileStream(); this->CloseBuildFileStream();
} }