summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 732593f..d80adf1 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1948,6 +1948,10 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
this->LanguageCompilerRule(language, config, WithScanning::No));
cmNinjaVars& vars = objBuild.Variables;
+ // The swift toolchain leaves outputs untouched if there are no meaningful
+ // changes to input files (e.g. addition of a comment).
+ vars.emplace("restat", "1");
+
std::string const moduleName =
getTargetPropertyOrDefault(target, "Swift_MODULE_NAME", target.GetName());
std::string const moduleDirectory = getTargetPropertyOrDefault(