Skip to content

ENH: add CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH property to allow a complete reset of rpath

Jiang Yue requested to merge jiangyue12392/cmake:remove_compiler_rpath into master

This pull request adds an additional property CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH to allow users to set rpath fully. The current behaviour of set(CMAKE_INSTALL_RPATH new_rpath) appends the new rpath to compiler defined rpath due to commit 3ec92267 However, in some use cases the compiler defined rpath is undesirable. E.g, when the binary executable is moved to run in a new environment. The CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH keyword together with the CMAKE_INSTALL_RPATH gives users more degree of control on rpath settings.

Edited by Jiang Yue

Merge request reports