summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2014-06-13 10:11:06 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-16 12:51:38 (GMT)
commit04377f1b318020ef0c9fef099842f26290d19324 (patch)
treedfd73d2c1213d0bb4494340fd60858a6f292da06 /Source
parent55d6aa36a522f2dd7849ccd53d9e743a88f8c7a1 (diff)
downloadCMake-04377f1b318020ef0c9fef099842f26290d19324.zip
CMake-04377f1b318020ef0c9fef099842f26290d19324.tar.gz
CMake-04377f1b318020ef0c9fef099842f26290d19324.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 731bc00..60643ac 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();