summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorJamie Snape <jamie.snape@kitware.com>2016-10-12 22:15:35 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-13 17:32:22 (GMT)
commit933e54d3ccf59fd756997752a041ee84e5f85897 (patch)
treea8c311fbbd44c783c35d9bdba1fd11c1a057bdae /Source/cmMakefileExecutableTargetGenerator.cxx
parentb99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (diff)
downloadCMake-933e54d3ccf59fd756997752a041ee84e5f85897.zip
CMake-933e54d3ccf59fd756997752a041ee84e5f85897.tar.gz
CMake-933e54d3ccf59fd756997752a041ee84e5f85897.tar.bz2
Honor LINK_WHAT_YOU_USE when set to OFF
Explicitly setting variable CMAKE_LINK_WHAT_YOU_USE or property LINK_WHAT_YOU_USE to OFF should not cause LWYU to run. Fix the property lookup to use GetPropertyAsBool.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx4
1 files changed, 2 insertions, 2 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=";