From 3d822e3a25bde31e7521d6c9a589669d91b979e6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 May 2007 12:05:28 -0400 Subject: ENH: Moved link library related code from GenerateSourceFilesFromSourceLists to AnalyzeLibDependencies to make the former do no more than what its name says. --- Source/cmTarget.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2f2ea4e..e8b6fdb 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -694,16 +694,8 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf) this->SourceFiles.push_back(mf.AddSource(file)); } } - - // expand any link library variables whle we are at it - LinkLibraryVectorType::iterator p = this->LinkLibraries.begin(); - for (;p != this->LinkLibraries.end(); ++p) - { - mf.ExpandVariablesInString(p->first, true, true); - } } - void cmTarget::MergeLinkLibraries( cmMakefile& mf, const char *selfname, const LinkLibraryVectorType& libs ) @@ -977,6 +969,19 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf ) // cyclic dependencies, so this is probably not a big deal. Note that // the link line is always correct, just not necessary optimal. + { + // Expand variables in link library names. This is for backwards + // compatibility with very early CMake versions and should + // eventually be removed. This code was moved here from the end of + // old source list processing code which was called just before this + // method. + for(LinkLibraryVectorType::iterator p = this->LinkLibraries.begin(); + p != this->LinkLibraries.end(); ++p) + { + this->Makefile->ExpandVariablesInString(p->first, true, true); + } + } + typedef std::vector< std::string > LinkLine; // The dependency map. -- cgit v0.12