diff options
author | Brad King <brad.king@kitware.com> | 2016-10-13 17:38:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-13 17:38:28 (GMT) |
commit | 2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7 (patch) | |
tree | 04c7319272faedd0f41316c41ea5b83535eda0ed /Source | |
parent | f6386a768e98b77a0128ac2aac4d07e241b17da4 (diff) | |
parent | 933e54d3ccf59fd756997752a041ee84e5f85897 (diff) | |
download | CMake-2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7.zip CMake-2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7.tar.gz CMake-2d6fba67804ffcdeb1ca95198aacb326dd8fc4e7.tar.bz2 |
Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index cb20117..4a6990e 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -192,7 +192,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) this->LocalGenerator->AppendFlags( linkFlags, this->Makefile->GetDefinition(export_flag_var)); } - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed"); } @@ -354,7 +354,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.LinkFlags = linkFlags.c_str(); vars.Manifests = manifests.c_str(); - if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b969bfb..2b1d7cc 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -161,7 +161,7 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName); this->AddModuleDefinitionFlag(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); @@ -638,7 +638,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); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 095c703..5b56813 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -315,7 +315,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd() const char* linkCmd = mf->GetDefinition(linkCmdVar); if (linkCmd) { cmSystemTools::ExpandListArgument(linkCmd, linkCmds); - if (this->GetGeneratorTarget()->GetProperty("LINK_WHAT_YOU_USE")) { + if (this->GetGeneratorTarget()->GetPropertyAsBool("LINK_WHAT_YOU_USE")) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); @@ -505,7 +505,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["LINK_PATH"] = frameworkPath + linkPath; std::string lwyuFlags; - if (genTarget.GetProperty("LINK_WHAT_YOU_USE")) { + if (genTarget.GetPropertyAsBool("LINK_WHAT_YOU_USE")) { lwyuFlags = " -Wl,--no-as-needed"; } |