Просмотр исходного кода

Create explicit cmTarget::FinishConfigure step

This method is called during ConfigureFinalPass on every target.  It
gives each target a chance to do some final processing after it is known
that no more commands will affect it.  Currently we just call the old
AnalyzeLibDependencies that used to be called directly.
Brad King 16 лет назад
Родитель
Сommit
78f0811628
3 измененных файлов с 12 добавлено и 2 удалено
  1. 1 1
      Source/cmMakefile.cxx
  2. 7 0
      Source/cmTarget.cxx
  3. 4 1
      Source/cmTarget.h

+ 1 - 1
Source/cmMakefile.cxx

@@ -810,7 +810,7 @@ void cmMakefile::ConfigureFinalPass()
   for (cmTargets::iterator l = this->Targets.begin();
        l != this->Targets.end(); l++)
     {
-    l->second.AnalyzeLibDependencies(*this);
+    l->second.FinishConfigure();
     }
 }
 

+ 7 - 0
Source/cmTarget.cxx

@@ -1027,6 +1027,13 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     this->Makefile->GetPolicyStatus(cmPolicies::CMP0008);
 }
 
+//----------------------------------------------------------------------------
+void cmTarget::FinishConfigure()
+{
+  // Do old-style link dependency analysis.
+  this->AnalyzeLibDependencies(*this->Makefile);
+}
+
 //----------------------------------------------------------------------------
 cmListFileBacktrace const& cmTarget::GetBacktrace() const
 {

+ 4 - 1
Source/cmTarget.h

@@ -219,7 +219,8 @@ public:
   ///! Get the utilities used by this target
   std::set<cmStdString>const& GetUtilities() const { return this->Utilities; }
 
-  void AnalyzeLibDependencies( const cmMakefile& mf );
+  /** Finalize the target at the end of the Configure step.  */
+  void FinishConfigure();
 
   ///! Set/Get a property of this target file
   void SetProperty(const char *prop, const char *value);
@@ -489,6 +490,8 @@ private:
                            const LibraryID& lib,
                            DependencyMap& dep_map);
 
+  void AnalyzeLibDependencies( const cmMakefile& mf );
+
   const char* GetSuffixVariableInternal(bool implib);
   const char* GetPrefixVariableInternal(bool implib);
   std::string GetFullNameInternal(const char* config, bool implib);