summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d32bcd8..8512b99 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1402,14 +1402,30 @@ bool cmGeneratorTarget::MacOSXUseInstallNameDir() const
return cmSystemTools::IsOn(build_with_install_name);
}
+ cmPolicies::PolicyStatus cmp0068 = this->GetPolicyStatusCMP0068();
+ if (cmp0068 == cmPolicies::NEW) {
+ return false;
+ }
+
bool use_install_name = this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH");
+ if (use_install_name && cmp0068 == cmPolicies::WARN) {
+ this->LocalGenerator->GetGlobalGenerator()->AddCMP0068WarnTarget(
+ this->GetName());
+ }
+
return use_install_name;
}
bool cmGeneratorTarget::CanGenerateInstallNameDir(
InstallNameType name_type) const
{
+ cmPolicies::PolicyStatus cmp0068 = this->GetPolicyStatusCMP0068();
+
+ if (cmp0068 == cmPolicies::NEW) {
+ return true;
+ }
+
bool skip = this->Makefile->IsOn("CMAKE_SKIP_RPATH");
if (name_type == INSTALL_NAME_FOR_INSTALL) {
skip |= this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
@@ -1417,6 +1433,11 @@ bool cmGeneratorTarget::CanGenerateInstallNameDir(
skip |= this->GetPropertyAsBool("SKIP_BUILD_RPATH");
}
+ if (skip && cmp0068 == cmPolicies::WARN) {
+ this->LocalGenerator->GetGlobalGenerator()->AddCMP0068WarnTarget(
+ this->GetName());
+ }
+
return !skip;
}