summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-19 19:47:36 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-19 19:51:24 (GMT)
commit866c75dedd42fae9dd05be402bdc94d51ffc7713 (patch)
tree1fbaeffbde5121b4cd6ad8c572bb674aea7f484f /Source
parente45e503f140f99f4fcf387e5359e7aba4bb1de0e (diff)
downloadCMake-866c75dedd42fae9dd05be402bdc94d51ffc7713.zip
CMake-866c75dedd42fae9dd05be402bdc94d51ffc7713.tar.gz
CMake-866c75dedd42fae9dd05be402bdc94d51ffc7713.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index a8a307c..64c2625 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -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";