mirror of
https://github.com/reactos/CMake.git
synced 2025-03-02 17:05:44 +00:00
PIE link options: No warning when policy CMP0083 is not set.
Fixes: #18955
This commit is contained in:
parent
e6897c72e7
commit
98a2d42301
@ -23,9 +23,10 @@ which it is used, it is the project's responsibility to use the
|
||||
:prop_tgt:`POSITION_INDEPENDENT_CODE` target property for executables will be
|
||||
honored at link time.
|
||||
|
||||
This policy was introduced in CMake version 3.14. CMake version
|
||||
|release| warns when the policy is not set and uses ``OLD`` behavior. Use
|
||||
the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
This policy was introduced in CMake version 3.14. Use the
|
||||
:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
Unlike most policies, CMake version |release| does not warn when this policy is
|
||||
not set and simply uses ``OLD`` behavior.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user