diff options
author | Brad King <brad.king@kitware.com> | 2019-02-20 14:00:52 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-20 14:01:00 (GMT) |
commit | 8732a2b3ba81d7e512d8c317b037db5caec10ee4 (patch) | |
tree | 5aa6c137feb68cbd1f68ddc03b06b0716b947017 /Source | |
parent | 462a320c8db91f4f646a19f34b9b41154019a68e (diff) | |
parent | c489c3e7158417b1161d46555ce1c2bcb31527fc (diff) | |
download | CMake-8732a2b3ba81d7e512d8c317b037db5caec10ee4.zip CMake-8732a2b3ba81d7e512d8c317b037db5caec10ee4.tar.gz CMake-8732a2b3ba81d7e512d8c317b037db5caec10ee4.tar.bz2 |
Merge topic 'once-is-enough'
c489c3e715 Ninja: remove duplicate local variable (NFC)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2986
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 3874f48..3784313 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -799,10 +799,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() std::string frameworkPath; std::string linkPath; - cmGeneratorTarget& genTarget = *this->GetGeneratorTarget(); - std::string createRule = genTarget.GetCreateRuleVariable( - this->TargetLinkLanguage, this->GetConfigName()); + std::string createRule = + gt.GetCreateRuleVariable(this->TargetLinkLanguage, this->GetConfigName()); bool useWatcomQuote = mf->IsOn(createRule + "_USE_WATCOM_QUOTE"); cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator(); @@ -815,9 +814,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->GetLocalGenerator()->GetStateSnapshot().GetDirectory())); linkLineComputer->SetUseWatcomQuote(useWatcomQuote); - localGen.GetTargetFlags( - linkLineComputer.get(), this->GetConfigName(), vars["LINK_LIBRARIES"], - vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, &genTarget); + localGen.GetTargetFlags(linkLineComputer.get(), this->GetConfigName(), + vars["LINK_LIBRARIES"], vars["FLAGS"], + vars["LINK_FLAGS"], frameworkPath, linkPath, >); // Add OS X version flags, if any. if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || @@ -838,7 +837,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["LINK_PATH"] = frameworkPath + linkPath; std::string lwyuFlags; - if (genTarget.GetPropertyAsBool("LINK_WHAT_YOU_USE")) { + if (gt.GetPropertyAsBool("LINK_WHAT_YOU_USE")) { lwyuFlags = " -Wl,--no-as-needed"; } @@ -847,17 +846,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // code between the Makefile executable and library generators. if (targetType == cmStateEnums::EXECUTABLE) { std::string t = vars["FLAGS"]; - localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName); + localGen.AddArchitectureFlags(t, >, TargetLinkLanguage, cfgName); t += lwyuFlags; vars["FLAGS"] = t; } else { std::string t = vars["ARCH_FLAGS"]; - localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName); + localGen.AddArchitectureFlags(t, >, TargetLinkLanguage, cfgName); vars["ARCH_FLAGS"] = t; t.clear(); t += lwyuFlags; - localGen.AddLanguageFlagsForLinking(t, &genTarget, TargetLinkLanguage, - cfgName); + localGen.AddLanguageFlagsForLinking(t, >, TargetLinkLanguage, cfgName); vars["LANGUAGE_COMPILE_FLAGS"] = t; } if (this->GetGeneratorTarget()->HasSOName(cfgName)) { @@ -880,7 +878,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() targetOutputImplib, cmOutputConverter::SHELL); vars["TARGET_IMPLIB"] = impLibPath; EnsureParentDirectoryExists(impLibPath); - if (genTarget.HasImportLibrary(cfgName)) { + if (gt.HasImportLibrary(cfgName)) { byproducts.push_back(targetOutputImplib); } } |