summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 9cbd502..5f52e1d 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -385,6 +385,11 @@ void cmGlobalNinjaGenerator::Generate()
this->WriteTargetAliases(*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->CloseBuildFileStream();
}