diff options
author | Brad King <brad.king@kitware.com> | 2019-07-12 16:37:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-12 21:37:02 (GMT) |
commit | 7ff9ab3b101b131bd4a91a459f66ce27f97f4757 (patch) | |
tree | 1e3bbc44ab71c72a1f6c2a6468f63221e3736445 /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49 (diff) | |
download | CMake-7ff9ab3b101b131bd4a91a459f66ce27f97f4757.zip CMake-7ff9ab3b101b131bd4a91a459f66ce27f97f4757.tar.gz CMake-7ff9ab3b101b131bd4a91a459f66ce27f97f4757.tar.bz2 |
Makefile: De-duplicate executable link rule lookup
Use `GetCreateRuleVariable` instead of duplicating the variable lookup.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 2001c1f..2950bfb 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -482,9 +482,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // Construct the main link rule. 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::vector<std::string> commands1; cmSystemTools::ExpandListArgument(linkRule, real_link_commands); |