Ninja: Add 'restat' parameter to custom command generation method
Pass 'true' from all call sites to preserve existing behavior.
This commit is contained in:
parent
866c75dedd
commit
7d64a0598d
|
@ -284,6 +284,7 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
|
|||
const std::string& description,
|
||||
const std::string& comment,
|
||||
bool uses_terminal,
|
||||
bool restat,
|
||||
const cmNinjaDeps& outputs,
|
||||
const cmNinjaDeps& deps,
|
||||
const cmNinjaDeps& orderOnly)
|
||||
|
@ -300,7 +301,10 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
|
|||
cmNinjaVars vars;
|
||||
vars["COMMAND"] = cmd;
|
||||
vars["DESC"] = EncodeLiteral(description);
|
||||
if (restat)
|
||||
{
|
||||
vars["restat"] = "1";
|
||||
}
|
||||
if (uses_terminal && SupportsConsolePool())
|
||||
{
|
||||
vars["pool"] = "console";
|
||||
|
@ -924,6 +928,7 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
|
|||
WriteCustomCommandBuild(/*command=*/"", /*description=*/"",
|
||||
"Assume dependencies for generated source file.",
|
||||
/*uses_terminal*/false,
|
||||
/*restat*/true,
|
||||
cmNinjaDeps(1, i->first), deps);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ public:
|
|||
const std::string& description,
|
||||
const std::string& comment,
|
||||
bool uses_terminal,
|
||||
bool restat,
|
||||
const cmNinjaDeps& outputs,
|
||||
const cmNinjaDeps& deps = cmNinjaDeps(),
|
||||
const cmNinjaDeps& orderOnly = cmNinjaDeps());
|
||||
|
|
|
@ -434,6 +434,7 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
|
|||
this->ConstructComment(ccg),
|
||||
"Custom command for " + ninjaOutputs[0],
|
||||
cc->GetUsesTerminal(),
|
||||
/*restat*/true,
|
||||
ninjaOutputs,
|
||||
ninjaDeps,
|
||||
orderOnlyDeps);
|
||||
|
|
|
@ -131,6 +131,7 @@ void cmNinjaUtilityTargetGenerator::Generate()
|
|||
desc,
|
||||
"Utility command for " + this->GetTargetName(),
|
||||
uses_terminal,
|
||||
/*restat*/true,
|
||||
util_outputs,
|
||||
deps);
|
||||
|
||||
|
|
Loading…
Reference in New Issue