Commit 2d837090 authored by Brad King's avatar Brad King
Browse files

Merge branch 'docs-INSTALL_REMOVE_ENVIRONMENT_PATH' into release-3.16

Merge-request: !3985
parents c831e409 dd05ef42
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.
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.
......@@ -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";
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment