Commit 04377f1b authored by Adam Strzelecki's avatar Adam Strzelecki Committed by Brad King
Browse files

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.
parent 55d6aa36
......@@ -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" );
li = this->EvaluationFiles.begin();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment