summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-05 13:06:29 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-05 13:06:29 (GMT)
commit78f08116287fb534bfb0bc2921fd3f5bac47ce93 (patch)
treedcee076bff0d4886f0e250eb2964e4b3c1ccf080
parent847875bebd79c45501dc2d584a6fd854397c5936 (diff)
downloadCMake-78f08116287fb534bfb0bc2921fd3f5bac47ce93.zip
CMake-78f08116287fb534bfb0bc2921fd3f5bac47ce93.tar.gz
CMake-78f08116287fb534bfb0bc2921fd3f5bac47ce93.tar.bz2
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.
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmTarget.cxx7
-rw-r--r--Source/cmTarget.h5
3 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ce425d0..914a8c5 100644
--- a/Source/cmMakefile.cxx
+++ b/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();
}
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7a1d014..440d5c7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1028,6 +1028,13 @@ void cmTarget::SetMakefile(cmMakefile* mf)
}
//----------------------------------------------------------------------------
+void cmTarget::FinishConfigure()
+{
+ // Do old-style link dependency analysis.
+ this->AnalyzeLibDependencies(*this->Makefile);
+}
+
+//----------------------------------------------------------------------------
cmListFileBacktrace const& cmTarget::GetBacktrace() const
{
return this->Internal->Backtrace;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index e8a82a5..349d0e0 100644
--- a/Source/cmTarget.h
+++ b/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);