summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-05 16:30:56 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-05 16:30:56 (GMT)
commit2d83709038a40fd15abba23812150e78da963960 (patch)
treee36bc6c24d58355abd06b0390106dce4bbf168ac
parentc831e409a53a33c3b3bdbaa9c19be5ae3364e1f6 (diff)
parentdd05ef429ab9f2d0377efba7a2bca1bb7181dc2f (diff)
downloadCMake-2d83709038a40fd15abba23812150e78da963960.zip
CMake-2d83709038a40fd15abba23812150e78da963960.tar.gz
CMake-2d83709038a40fd15abba23812150e78da963960.tar.bz2
Merge branch 'docs-INSTALL_REMOVE_ENVIRONMENT_PATH' into release-3.16
Merge-request: !3985
-rw-r--r--Help/prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH.rst18
-rw-r--r--Help/variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH.rst10
-rw-r--r--Source/cmInstallTargetGenerator.cxx2
3 files changed, 18 insertions, 12 deletions
diff --git a/Help/prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH.rst b/Help/prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
index a474fc6..72dcaa0 100644
--- a/Help/prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
+++ b/Help/prop_tgt/INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
@@ -1,10 +1,16 @@
INSTALL_REMOVE_ENVIRONMENT_RPATH
--------------------------------
-Removes compiler defined rpaths durimg installation.
+Controls whether toolchain-defined rpaths should be removed during installation.
-``INSTALL_REMOVE_ENVIRONMENT_RPATH`` is a boolean that if set to ``True`` will
-remove compiler defined rpaths from the project if the user also defines rpath
-with :prop_tgt:`INSTALL_RPATH`. This property is initialized by whether the
-value of :variable:`CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH` is set when a
-target is created.
+When a target is being installed, CMake may need to rewrite its rpath
+information. This occurs when the install rpath (as specified by the
+:prop_tgt:`INSTALL_RPATH` target property) has different contents to the rpath
+that the target was built with. Some toolchains insert their own rpath
+contents into the binary as part of the build. By default, CMake will
+preserve those extra inserted contents in the install rpath. For those
+scenarios where such toolchain-inserted entries need to be discarded during
+install, set the ``INSTALL_REMOVE_ENVIRONMENT_RPATH`` target property to true.
+
+This property is initialized by the value of
+:variable:`CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH` when the target is created.
diff --git a/Help/variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH.rst b/Help/variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
index 19ae5f3..76ca3da 100644
--- a/Help/variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
+++ b/Help/variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH.rst
@@ -1,9 +1,9 @@
CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
--------------------------------------
-Removes compiler defined rpaths durimg installation.
+Sets the default for whether toolchain-defined rpaths should be removed during
+installation.
-``CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH`` is a boolean that if set to ``true``
-removes compiler defined rpaths from the project if the user also defines rpath
-with :prop_tgt:`INSTALL_RPATH`. This is used to initialize the target property
-:prop_tgt:`INSTALL_REMOVE_ENVIRONMENT_RPATH` for all targets.
+``CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH`` is a boolean that provides the
+default value for the :prop_tgt:`INSTALL_REMOVE_ENVIRONMENT_RPATH` property
+of all subsequently created targets.
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 0cd04cc..aa92fa7 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -775,7 +775,7 @@ void cmInstallTargetGenerator::AddChrpathPatchRule(
if (this->Target->GetPropertyAsBool("INSTALL_REMOVE_ENVIRONMENT_RPATH")) {
os << "\n" << indent << " INSTALL_REMOVE_ENVIRONMENT_RPATH)\n";
} else {
- os << indent << ")\n";
+ os << ")\n";
}
}
}