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.
This commit is contained in:
Brad King 2015-11-19 14:47:36 -05:00
parent e45e503f14
commit 866c75dedd
1 changed files with 2 additions and 1 deletions

View File

@ -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";