summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-19 20:09:40 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-19 20:11:00 (GMT)
commit7d64a0598db5da2c4c1874f9fe8726fd6c9b18a7 (patch)
tree4ebff3385c9520fecffb588f0b0c448d073d04df /Source/cmGlobalNinjaGenerator.cxx
parent866c75dedd42fae9dd05be402bdc94d51ffc7713 (diff)
downloadCMake-7d64a0598db5da2c4c1874f9fe8726fd6c9b18a7.zip
CMake-7d64a0598db5da2c4c1874f9fe8726fd6c9b18a7.tar.gz
CMake-7d64a0598db5da2c4c1874f9fe8726fd6c9b18a7.tar.bz2
Ninja: Add 'restat' parameter to custom command generation method
Pass 'true' from all call sites to preserve existing behavior.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 64c2625..0f06e43 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -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);
- vars["restat"] = "1";
+ 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);
}
}