浏览代码

Merge topic 'file-GENERATE-earlier'

f1fb63b306 file(GENERATE): Create output file structures even earlier

Acked-by: Kitware Robot <[email protected]>
Merge-request: !3895
Brad King 6 年之前
父节点
当前提交
5fa1315b03
共有 4 个文件被更改,包括 11 次插入15 次删除
  1. 1 8
      Source/cmGlobalGenerator.cxx
  2. 0 2
      Source/cmGlobalGenerator.h
  3. 9 5
      Source/cmLocalGenerator.cxx
  4. 1 0
      Source/cmLocalGenerator.h

+ 1 - 8
Source/cmGlobalGenerator.cxx

@@ -1556,6 +1556,7 @@ bool cmGlobalGenerator::QtAutoGen()
 bool cmGlobalGenerator::AddAutomaticSources()
 {
   for (cmLocalGenerator* lg : this->LocalGenerators) {
+    lg->CreateEvaluationFileOutputs();
     for (cmGeneratorTarget* gt : lg->GetGeneratorTargets()) {
       if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
         continue;
@@ -3095,14 +3096,6 @@ cmGlobalGenerator::GetFilenameTargetDepends(cmSourceFile* sf) const
   return this->FilenameTargetDepends[sf];
 }
 
-void cmGlobalGenerator::CreateEvaluationSourceFiles(
-  std::string const& config) const
-{
-  for (cmLocalGenerator* localGen : this->LocalGenerators) {
-    localGen->CreateEvaluationFileOutputs(config);
-  }
-}
-
 void cmGlobalGenerator::ProcessEvaluationFiles()
 {
   std::vector<std::string> generatedFiles;

+ 0 - 2
Source/cmGlobalGenerator.h

@@ -457,8 +457,6 @@ public:
 
   bool GenerateCPackPropertiesFile();
 
-  void CreateEvaluationSourceFiles(std::string const& config) const;
-
   void SetFilenameTargetDepends(
     cmSourceFile* sf, std::set<cmGeneratorTarget const*> const& tgts);
   const std::set<const cmGeneratorTarget*>& GetFilenameTargetDepends(

+ 9 - 5
Source/cmLocalGenerator.cxx

@@ -263,11 +263,6 @@ static void MoveSystemIncludesToEnd(std::vector<BT<std::string>>& includeDirs,
 
 void cmLocalGenerator::TraceDependencies()
 {
-  std::vector<std::string> const& configs =
-    this->Makefile->GetGeneratorConfigs();
-  for (std::string const& c : configs) {
-    this->GlobalGenerator->CreateEvaluationSourceFiles(c);
-  }
   // Generate the rule files for each target.
   const std::vector<cmGeneratorTarget*>& targets = this->GetGeneratorTargets();
   for (cmGeneratorTarget* target : targets) {
@@ -360,6 +355,15 @@ void cmLocalGenerator::GenerateTestFiles()
   }
 }
 
+void cmLocalGenerator::CreateEvaluationFileOutputs()
+{
+  std::vector<std::string> const& configs =
+    this->Makefile->GetGeneratorConfigs();
+  for (std::string const& c : configs) {
+    this->CreateEvaluationFileOutputs(c);
+  }
+}
+
 void cmLocalGenerator::CreateEvaluationFileOutputs(std::string const& config)
 {
   std::vector<cmGeneratorExpressionEvaluationFile*> ef =

+ 1 - 0
Source/cmLocalGenerator.h

@@ -418,6 +418,7 @@ public:
 
   void IssueMessage(MessageType t, std::string const& text) const;
 
+  void CreateEvaluationFileOutputs();
   void CreateEvaluationFileOutputs(const std::string& config);
   void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles);