summaryrefslogtreecommitdiff
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-11-05 08:33:47 -0400
committerBrad King <brad.king@kitware.com>2010-11-05 08:33:47 -0400
commit07cfa57ec5f9f906e075512646100719a0a615aa (patch)
tree020369090ea590192ebf629228dc7bc046892fa6 /Source/cmMakefileLibraryTargetGenerator.cxx
parent947de96030723fa231ed1ddc9d94d755f3d68d0b (diff)
downloadcmake-07cfa57ec5f9f906e075512646100719a0a615aa.tar.gz
Consolidate duplicate link rule make dependency code
Factor code previously duplicated for library and executable rules into a common method.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx25
1 files changed, 1 insertions, 24 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index dff91fe030..049a338c9a 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -308,33 +308,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// code duplication.
std::vector<std::string> commands;
- std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath();
- std::string objTarget;
-
// Build list of dependencies.
std::vector<std::string> depends;
- for(std::vector<std::string>::const_iterator obj = this->Objects.begin();
- obj != this->Objects.end(); ++obj)
- {
- objTarget = relPath;
- objTarget += *obj;
- depends.push_back(objTarget);
- }
+ this->AppendLinkDepends(depends);
- // Add dependencies on targets that must be built first.
- this->AppendTargetDepends(depends);
-
- // Add a dependency on the rule file itself.
- this->LocalGenerator->AppendRuleDepend(depends,
- this->BuildFileNameFull.c_str());
-
- for(std::vector<std::string>::const_iterator obj
- = this->ExternalObjects.begin();
- obj != this->ExternalObjects.end(); ++obj)
- {
- depends.push_back(*obj);
- }
-
// Get the language to use for linking this library.
const char* linkLanguage =
this->Target->GetLinkerLanguage(this->ConfigName);