mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
Ninja: Implement support for GNUToMS
Port the implementation from `cmMakefileTargetGenerator::GetLinkRule`. Fixes: #13870
This commit is contained in:
committed by
Brad King
parent
ebe436eb97
commit
d2d7ae0738
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user