summaryrefslogtreecommitdiffstats
path: root/Source
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
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')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
-rw-r--r--Source/cmGlobalNinjaGenerator.h1
-rw-r--r--Source/cmLocalNinjaGenerator.cxx1
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx1
4 files changed, 9 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);
}
}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index c494d36..8656590 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -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());
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index ecaa269..d9517d8 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -434,6 +434,7 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
this->ConstructComment(ccg),
"Custom command for " + ninjaOutputs[0],
cc->GetUsesTerminal(),
+ /*restat*/true,
ninjaOutputs,
ninjaDeps,
orderOnlyDeps);
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index edc65f0..ac66fcd 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -131,6 +131,7 @@ void cmNinjaUtilityTargetGenerator::Generate()
desc,
"Utility command for " + this->GetTargetName(),
uses_terminal,
+ /*restat*/true,
util_outputs,
deps);