summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2014-06-13 12:11:06 +0200
committerBrad King <brad.king@kitware.com>2014-06-16 08:51:38 -0400
commit04377f1b318020ef0c9fef099842f26290d19324 (patch)
treedfd73d2c1213d0bb4494340fd60858a6f292da06
parent55d6aa36a522f2dd7849ccd53d9e743a88f8c7a1 (diff)
downloadcmake-04377f1b318020ef0c9fef099842f26290d19324.tar.gz
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.
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 731bc00c05..60643acc42 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -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();