summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-28 16:05:28 (GMT)
committerBrad King <brad.king@kitware.com>2007-05-28 16:05:28 (GMT)
commit3d822e3a25bde31e7521d6c9a589669d91b979e6 (patch)
treee727b2526e3fac9aa3389b1ee6eee7a2e8090384 /Source/cmTarget.cxx
parent06472d620a73b51bdfddcb64987cffabddfb07f3 (diff)
downloadCMake-3d822e3a25bde31e7521d6c9a589669d91b979e6.zip
CMake-3d822e3a25bde31e7521d6c9a589669d91b979e6.tar.gz
CMake-3d822e3a25bde31e7521d6c9a589669d91b979e6.tar.bz2
ENH: Moved link library related code from GenerateSourceFilesFromSourceLists to AnalyzeLibDependencies to make the former do no more than what its name says.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx21
1 files 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.