From 866c75dedd42fae9dd05be402bdc94d51ffc7713 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 19 Nov 2015 14:47:36 -0500 Subject: Ninja: Refactor generation of 'restat' on custom commands Move generation of 'restat = 1' from the CUSTOM_COMMAND rule to every build statement using it. This will allow future selection of this option on a per-custom-command basis. --- Source/cmGlobalNinjaGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a8a307c..64c2625 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -275,7 +275,7 @@ void cmGlobalNinjaGenerator::AddCustomCommandRule() /*deptype*/ "", /*rspfile*/ "", /*rspcontent*/ "", - /*restat*/ "1", + /*restat*/ "", // bound on each build statement as needed /*generator*/ false); } @@ -300,6 +300,7 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command, cmNinjaVars vars; vars["COMMAND"] = cmd; vars["DESC"] = EncodeLiteral(description); + vars["restat"] = "1"; if (uses_terminal && SupportsConsolePool()) { vars["pool"] = "console"; -- cgit v0.12