Преглед на файлове

Merge topic 'ninja-avoid-double-phony'

04377f1b Ninja: Remove CMake includes from explicit depends (#14972)
Brad King преди 11 години
родител
ревизия
0b028c6f0a
променени са 1 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. 9 0
      Source/cmGlobalNinjaGenerator.cxx

+ 9 - 0
Source/cmGlobalNinjaGenerator.cxx

@@ -961,7 +961,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();