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:
parent
e45e503f14
commit
866c75dedd
@ -275,7 +275,7 @@ void cmGlobalNinjaGenerator::AddCustomCommandRule()
|
|||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ "1",
|
/*restat*/ "", // bound on each build statement as needed
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,6 +300,7 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
|
|||||||
cmNinjaVars vars;
|
cmNinjaVars vars;
|
||||||
vars["COMMAND"] = cmd;
|
vars["COMMAND"] = cmd;
|
||||||
vars["DESC"] = EncodeLiteral(description);
|
vars["DESC"] = EncodeLiteral(description);
|
||||||
|
vars["restat"] = "1";
|
||||||
if (uses_terminal && SupportsConsolePool())
|
if (uses_terminal && SupportsConsolePool())
|
||||||
{
|
{
|
||||||
vars["pool"] = "console";
|
vars["pool"] = "console";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user