mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-12 01:09:47 -06:00
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user