Ninja: Remove CMake includes from explicit depends (#14972)
It may happen that CMake include is an explicit dependency for some command, while all CMake includes are set phony in WriteTargetRebuildManifest, this may lead to duplicate phony generate rules which causes ninja warnings. We need to remove implicit CMake includes in WriteUnknownExplicitDependencies. This fixes FindCUDA ninja warnings.
This commit is contained in:
parent
55d6aa36a5
commit
04377f1b31
|
@ -972,7 +972,16 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
|
|||
{
|
||||
knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
|
||||
}
|
||||
//get list files which are implicit dependencies as well and will be phony
|
||||
//for rebuild manifest
|
||||
std::vector<std::string> const& lf = (*i)->GetMakefile()->GetListFiles();
|
||||
typedef std::vector<std::string>::const_iterator vect_it;
|
||||
for(vect_it j = lf.begin(); j != lf.end(); ++j)
|
||||
{
|
||||
knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
|
||||
}
|
||||
}
|
||||
knownDependencies.insert( "CMakeCache.txt" );
|
||||
|
||||
for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
|
||||
li = this->EvaluationFiles.begin();
|
||||
|
|
Loading…
Reference in New Issue