summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorAlbert Ziegenhagel <albert.ziegenhagel@scai.fraunhofer.de>2017-08-21 12:41:17 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-25 17:59:51 (GMT)
commitd2d7ae0738b2bb59ee5a701794e73802795b2ce6 (patch)
tree7390fc03f60c12fca7be1759ab4a3dd23da94181 /Source/cmNinjaNormalTargetGenerator.cxx
parentebe436eb97bf81704a1d0b074b3da4ac817f37d3 (diff)
downloadCMake-d2d7ae0738b2bb59ee5a701794e73802795b2ce6.zip
CMake-d2d7ae0738b2bb59ee5a701794e73802795b2ce6.tar.gz
CMake-d2d7ae0738b2bb59ee5a701794e73802795b2ce6.tar.bz2
Ninja: Implement support for GNUToMS
Port the implementation from `cmMakefileTargetGenerator::GetLinkRule`. Fixes: #13870
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index f029a3f..ddac20e 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -485,7 +485,16 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
this->TargetLinkLanguage, this->GetConfigName());
const char* linkCmd = mf->GetDefinition(linkCmdVar);
if (linkCmd) {
- cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+ std::string linkCmdStr = linkCmd;
+ if (this->GetGeneratorTarget()->HasImplibGNUtoMS()) {
+ std::string ruleVar = "CMAKE_";
+ ruleVar += this->GeneratorTarget->GetLinkerLanguage(this->ConfigName);
+ ruleVar += "_GNUtoMS_RULE";
+ if (const char* rule = this->Makefile->GetDefinition(ruleVar)) {
+ linkCmdStr += rule;
+ }
+ }
+ cmSystemTools::ExpandListArgument(linkCmdStr, linkCmds);
if (this->GetGeneratorTarget()->GetPropertyAsBool("LINK_WHAT_YOU_USE")) {
std::string cmakeCommand =
this->GetLocalGenerator()->ConvertToOutputFormat(