瀏覽代碼

Makefile: De-duplicate executable link rule lookup

Use `GetCreateRuleVariable` instead of duplicating the variable lookup.
Brad King 6 年之前
父節點
當前提交
7ff9ab3b10
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Source/cmMakefileExecutableTargetGenerator.cxx

+ 2 - 3
Source/cmMakefileExecutableTargetGenerator.cxx

@@ -482,9 +482,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
 
 
   // Construct the main link rule.
   // Construct the main link rule.
   std::vector<std::string> real_link_commands;
   std::vector<std::string> real_link_commands;
-  std::string linkRuleVar = "CMAKE_";
-  linkRuleVar += linkLanguage;
-  linkRuleVar += "_LINK_EXECUTABLE";
+  std::string linkRuleVar = this->GeneratorTarget->GetCreateRuleVariable(
+    linkLanguage, this->ConfigName);
   std::string linkRule = this->GetLinkRule(linkRuleVar);
   std::string linkRule = this->GetLinkRule(linkRuleVar);
   std::vector<std::string> commands1;
   std::vector<std::string> commands1;
   cmSystemTools::ExpandListArgument(linkRule, real_link_commands);
   cmSystemTools::ExpandListArgument(linkRule, real_link_commands);