summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-27 04:05:31 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-27 04:05:38 (GMT)
commit80ff2102a41117fc829ad64c7c963bd0858a221b (patch)
tree4588d10520daab33ba3c8863b2811fb2aa9bfc7a /Source/cmNinjaNormalTargetGenerator.cxx
parentd2731a376cce3044b507bfaf4427d89f0a03d2cf (diff)
downloadCMake-80ff2102a41117fc829ad64c7c963bd0858a221b.zip
CMake-80ff2102a41117fc829ad64c7c963bd0858a221b.tar.gz
CMake-80ff2102a41117fc829ad64c7c963bd0858a221b.tar.bz2
Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6e08bca..613c7b5 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -219,6 +219,7 @@ std::vector<std::string>
cmNinjaNormalTargetGenerator
::ComputeLinkCmd()
{
+ std::vector<std::string> linkCmds;
cmTarget::TargetType targetType = this->GetTarget()->GetType();
switch (targetType) {
case cmTarget::STATIC_LIBRARY: {
@@ -230,7 +231,8 @@ cmNinjaNormalTargetGenerator
if (const char *linkCmd =
this->GetMakefile()->GetDefinition(linkCmdVar.c_str()))
{
- return std::vector<std::string>(1, linkCmd);
+ cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+ return linkCmds;
}
}
@@ -249,7 +251,7 @@ cmNinjaNormalTargetGenerator
linkCmdVar += "_ARCHIVE_CREATE";
const char *linkCmd =
this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
- linkCmds.push_back(linkCmd);
+ cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
{
std::string linkCmdVar = "CMAKE_";
@@ -257,7 +259,7 @@ cmNinjaNormalTargetGenerator
linkCmdVar += "_ARCHIVE_FINISH";
const char *linkCmd =
this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
- linkCmds.push_back(linkCmd);
+ cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
return linkCmds;
}
@@ -281,7 +283,8 @@ cmNinjaNormalTargetGenerator
}
const char *linkCmd =
this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
- return std::vector<std::string>(1, linkCmd);
+ cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+ return linkCmds;
}
default:
assert(0 && "Unexpected target type");