Merge topic '13582_configured_file_regeneration'

ad50250 cmMakefile: Track configured files so we can regenerate them (#13582)
4a6397a Ninja: Track configured files so we can regenerate them.
This commit is contained in:
Brad King 2013-06-25 08:55:02 -04:00 committed by CMake Topic Stage
commit aecacd093b
2 changed files with 4 additions and 0 deletions

View File

@ -961,6 +961,9 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) { this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) {
const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles(); const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles();
implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end()); implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end());
const std::vector<std::string>& of = (*i)->GetMakefile()->GetOutputFiles();
implicitDeps.insert(implicitDeps.end(), of.begin(), of.end());
} }
std::sort(implicitDeps.begin(), implicitDeps.end()); std::sort(implicitDeps.begin(), implicitDeps.end());
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),

View File

@ -3371,6 +3371,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
std::string sinfile = infile; std::string sinfile = infile;
this->AddCMakeDependFile(sinfile); this->AddCMakeDependFile(sinfile);
cmSystemTools::ConvertToUnixSlashes(soutfile); cmSystemTools::ConvertToUnixSlashes(soutfile);
this->AddCMakeOutputFile(soutfile);
mode_t perm = 0; mode_t perm = 0;
cmSystemTools::GetPermissions(sinfile.c_str(), perm); cmSystemTools::GetPermissions(sinfile.c_str(), perm);
std::string::size_type pos = soutfile.rfind('/'); std::string::size_type pos = soutfile.rfind('/');