summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-10-15 14:21:14 (GMT)
committerBrad King <brad.king@kitware.com>2008-10-15 14:21:14 (GMT)
commit07454a39f1fc57b147d1311b952702f3ff2b595b (patch)
tree011334564c55097ba6d50f21e01c7316eac704aa /Source/cmMakefileExecutableTargetGenerator.cxx
parentcd1528279c8c3662af0d1641e0d95e05821b6d10 (diff)
downloadCMake-07454a39f1fc57b147d1311b952702f3ff2b595b.zip
CMake-07454a39f1fc57b147d1311b952702f3ff2b595b.tar.gz
CMake-07454a39f1fc57b147d1311b952702f3ff2b595b.tar.bz2
ENH: Factor out listing of objects on command line
Previously generation of object file lists for linker and cleaning command lines was duplicated for library and executable target generators. This combines the implementations.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx28
1 files changed, 2 insertions, 26 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index c741284..848ae20 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -353,33 +353,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Construct object file lists that may be needed to expand the
// rule.
- std::string variableName;
- std::string variableNameExternal;
- this->WriteObjectsVariable(variableName, variableNameExternal);
std::string buildObjs;
- if(useResponseFile)
- {
- std::string objects;
- this->WriteObjectsString(objects);
- std::string objects_rsp =
- this->CreateResponseFile("objects.rsp", objects, depends);
- buildObjs = "@";
- buildObjs += this->Convert(objects_rsp.c_str(),
- cmLocalGenerator::NONE,
- cmLocalGenerator::SHELL);
- }
- else if(useLinkScript)
- {
- this->WriteObjectsString(buildObjs);
- }
- else
- {
- buildObjs = "$(";
- buildObjs += variableName;
- buildObjs += ") $(";
- buildObjs += variableNameExternal;
- buildObjs += ")";
- }
+ this->CreateObjectLists(useLinkScript, false, useResponseFile,
+ buildObjs, depends);
cmLocalGenerator::RuleVariables vars;
vars.Language = linkLanguage;