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.
This commit is contained in:
Brad King 2009-10-05 09:06:29 -04:00
parent 847875bebd
commit 78f0811628
3 changed files with 12 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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
{

View File

@ -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);