summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-05-03 20:34:05 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-05-03 20:34:05 (GMT)
commitcdf550de13a021d9d695618a9da97ae951efe9a0 (patch)
treeaf2897380246a51e8d35b06a40086cf29ce1d362 /Source/cmMakefile.cxx
parent399e1c0f3e67e40f7b6a2fcd7046f195f81fc4a7 (diff)
downloadCMake-cdf550de13a021d9d695618a9da97ae951efe9a0.zip
CMake-cdf550de13a021d9d695618a9da97ae951efe9a0.tar.gz
CMake-cdf550de13a021d9d695618a9da97ae951efe9a0.tar.bz2
ENH: rework library depend stuff
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f8bd461..40b0d45 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -665,11 +665,7 @@ void cmMakefile::AddGlobalLinkInformation(const char* name, cmTarget& target)
{
target.AddLinkDirectory(j->c_str());
}
- cmTarget::LinkLibraries::iterator i;
- for(i = m_LinkLibraries.begin(); i != m_LinkLibraries.end(); ++i)
- {
- this->AddLinkLibraryForTarget(name, i->first.c_str(), i->second);
- }
+ target.MergeLinkLibraries( *this, name, m_LinkLibraries );
}
@@ -703,8 +699,8 @@ void cmMakefile::AddLibrary(const char* lname, int shared,
target.SetInAll(true);
target.GetSourceLists() = srcs;
- m_Targets.insert(cmTargets::value_type(lname,target));
this->AddGlobalLinkInformation(lname, target);
+ m_Targets.insert(cmTargets::value_type(lname,target));
// Add an entry into the cache
cmCacheManager::GetInstance()->
@@ -769,8 +765,10 @@ void cmMakefile::AddExecutable(const char *exeName,
}
target.SetInAll(true);
target.GetSourceLists() = srcs;
- m_Targets.insert(cmTargets::value_type(exeName,target));
this->AddGlobalLinkInformation(exeName, target);
+
+ m_Targets.insert(cmTargets::value_type(exeName,target));
+
// Add an entry into the cache
cmCacheManager::GetInstance()->