summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorJiang Yue <jiangyue12392@gmail.com>2019-07-12 03:33:36 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-07-25 16:30:23 (GMT)
commitf08dcbffecd45889d8aeabdfa504ee76ef54e351 (patch)
tree4a01b8b65c4b5383392cbeb4893d80bf421d3a66 /Source/cmFileCommand.cxx
parent579e27ec97101d36d0f42d47bd7aa9c753b15be0 (diff)
downloadCMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.zip
CMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.tar.gz
CMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.tar.bz2
Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 9871f49..807b5b3 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1071,6 +1071,7 @@ bool cmFileCommand::HandleRPathChangeCommand(
std::string file;
const char* oldRPath = nullptr;
const char* newRPath = nullptr;
+ bool removeEnvironmentRPath = false;
enum Doing
{
DoingNone,
@@ -1086,6 +1087,8 @@ bool cmFileCommand::HandleRPathChangeCommand(
doing = DoingNew;
} else if (args[i] == "FILE") {
doing = DoingFile;
+ } else if (args[i] == "INSTALL_REMOVE_ENVIRONMENT_RPATH") {
+ removeEnvironmentRPath = true;
} else if (doing == DoingFile) {
file = args[i];
doing = DoingNone;
@@ -1124,7 +1127,9 @@ bool cmFileCommand::HandleRPathChangeCommand(
cmFileTimes const ft(file);
std::string emsg;
bool changed;
- if (!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg, &changed)) {
+
+ if (!cmSystemTools::ChangeRPath(file, oldRPath, newRPath,
+ removeEnvironmentRPath, &emsg, &changed)) {
std::ostringstream e;
/* clang-format off */
e << "RPATH_CHANGE could not write new RPATH:\n"