mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Merge topic 'LINK_WHAT_YOU_USE-allow-OFF'
2f79b22cMerge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF33cb0173Honor LINK_WHAT_YOU_USE when set to OFF933e54d3Honor LINK_WHAT_YOU_USE when set to OFF
This commit is contained in:
@@ -168,7 +168,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
|
||||
|
||||
this->AddModuleDefinitionFlag(linkLineComputer.get(), extraFlags);
|
||||
|
||||
if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) {
|
||||
if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) {
|
||||
this->LocalGenerator->AppendFlags(extraFlags, " -Wl,--no-as-needed");
|
||||
}
|
||||
this->WriteLibraryRules(linkRuleVar, extraFlags, relink);
|
||||
@@ -643,7 +643,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||
// Get the set of commands.
|
||||
std::string linkRule = this->GetLinkRule(linkRuleVar);
|
||||
cmSystemTools::ExpandListArgument(linkRule, real_link_commands);
|
||||
if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE") &&
|
||||
if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE") &&
|
||||
(this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) {
|
||||
std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat(
|
||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
||||
|
||||
Reference in New Issue
Block a user