diff options
author | Brad King <brad.king@kitware.com> | 2019-02-20 19:32:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-20 19:32:37 (GMT) |
commit | c925166764800be637ffc6d1df5086ebcabb766d (patch) | |
tree | bbce6101da7916fc65a3813e1ecd645296284dfb /Source | |
parent | c36bf6b13c6798d6388a2b4ca0c802a47f1b1ed4 (diff) | |
parent | 98a2d42301ec9ba0cd1c69b0a05351039bc69dc8 (diff) | |
download | CMake-c925166764800be637ffc6d1df5086ebcabb766d.zip CMake-c925166764800be637ffc6d1df5086ebcabb766d.tar.gz CMake-c925166764800be637ffc6d1df5086ebcabb766d.tar.bz2 |
Merge branch 'link-options' into release-3.14
Merge-request: !2996
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 78040c3..25349d4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -510,21 +510,10 @@ const char* cmGeneratorTarget::GetLinkPIEProperty( return nullptr; } - switch (this->GetPolicyStatusCMP0083()) { - case cmPolicies::WARN: { - std::ostringstream e; - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0083); - this->LocalGenerator->IssueMessage(MessageType::AUTHOR_WARNING, e.str()); - CM_FALLTHROUGH; - } - case cmPolicies::OLD: - return nullptr; - default: - // nothing to do - break; - } - - return PICValue.c_str(); + auto status = this->GetPolicyStatusCMP0083(); + return (status != cmPolicies::WARN && status != cmPolicies::OLD) + ? PICValue.c_str() + : nullptr; } bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang, |