summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-25 12:48:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-25 12:51:01 (GMT)
commitc068236bb9d003c43856dd2bc2052605d4377982 (patch)
tree0d7b9ffc006bb9f85581237d58f3e607a0c12d42 /Source/cmGeneratorTarget.cxx
parent90323ff0513c8291bc36ea9b84a55eeebbf00329 (diff)
parent98a2d42301ec9ba0cd1c69b0a05351039bc69dc8 (diff)
downloadCMake-c068236bb9d003c43856dd2bc2052605d4377982.zip
CMake-c068236bb9d003c43856dd2bc2052605d4377982.tar.gz
CMake-c068236bb9d003c43856dd2bc2052605d4377982.tar.bz2
Merge topic 'link-options'
98a2d42301 PIE link options: No warning when policy CMP0083 is not set. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2996
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6f5e9bd..3f23e5a 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,