summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-14 13:02:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-14 13:02:36 (GMT)
commitf0579e2fda1922f32efbf3e2b160cc004aafd99a (patch)
treed6d7220557d6b67f4ae7449fb1d3751271637b13
parent4c921e5c7b8170b95ba13c33e0f8ae21dd78055e (diff)
parent2f79b22ce049a15e4d4190bbe5e80a3bad9492e8 (diff)
downloadCMake-f0579e2fda1922f32efbf3e2b160cc004aafd99a.zip
CMake-f0579e2fda1922f32efbf3e2b160cc004aafd99a.tar.gz
CMake-f0579e2fda1922f32efbf3e2b160cc004aafd99a.tar.bz2
Merge topic 'LINK_WHAT_YOU_USE-allow-OFF'
2f79b22c Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF 33cb0173 Honor LINK_WHAT_YOU_USE when set to OFF 933e54d3 Honor LINK_WHAT_YOU_USE when set to OFF
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx4
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index bfc4857..ed34ce6 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -198,7 +198,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
this->LocalGenerator->GetLinkLibsCMP0065(
linkLanguage, *this->GeneratorTarget));
- if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) {
+ if (this->GeneratorTarget->GetPropertyAsBool("LINK_WHAT_YOU_USE")) {
this->LocalGenerator->AppendFlags(linkFlags, " -Wl,--no-as-needed");
}
@@ -375,7 +375,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 8a621ea..a19d70e 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -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);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index ab086eb..34fad9d 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -316,7 +316,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);
@@ -512,7 +512,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";
}