diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index fff972e58..e2c0e18a2 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -961,6 +961,9 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) { const std::vector& lf = (*i)->GetMakefile()->GetListFiles(); implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end()); + + const std::vector& of = (*i)->GetMakefile()->GetOutputFiles(); + implicitDeps.insert(implicitDeps.end(), of.begin(), of.end()); } std::sort(implicitDeps.begin(), implicitDeps.end()); implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d5d99a03a..f3a66bab8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3371,6 +3371,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile, std::string sinfile = infile; this->AddCMakeDependFile(sinfile); cmSystemTools::ConvertToUnixSlashes(soutfile); + this->AddCMakeOutputFile(soutfile); mode_t perm = 0; cmSystemTools::GetPermissions(sinfile.c_str(), perm); std::string::size_type pos = soutfile.rfind('/');