summaryrefslogtreecommitdiffstats
path: root/Tests
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 /Tests
parent579e27ec97101d36d0f42d47bd7aa9c753b15be0 (diff)
downloadCMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.zip
CMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.tar.gz
CMake-f08dcbffecd45889d8aeabdfa504ee76ef54e351.tar.bz2
Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeTests/ELFTest.cmake.in29
1 files changed, 27 insertions, 2 deletions
diff --git a/Tests/CMakeTests/ELFTest.cmake.in b/Tests/CMakeTests/ELFTest.cmake.in
index 4635778..85c2360 100644
--- a/Tests/CMakeTests/ELFTest.cmake.in
+++ b/Tests/CMakeTests/ELFTest.cmake.in
@@ -25,13 +25,38 @@ foreach(f ${files})
# Change the RPATH.
file(RPATH_CHANGE FILE "${f}"
OLD_RPATH "/sample/rpath"
- NEW_RPATH "/rpath/sample")
+ NEW_RPATH "/path1:/path2")
set(rpath)
- file(STRINGS "${f}" rpath REGEX "/rpath/sample" LIMIT_COUNT 1)
+ file(STRINGS "${f}" rpath REGEX "/path1:/path2" LIMIT_COUNT 1)
if(NOT rpath)
message(FATAL_ERROR "RPATH not changed in ${f}")
endif()
+ # Change the RPATH without compiler defined rpath removed
+ file(RPATH_CHANGE FILE "${f}"
+ OLD_RPATH "/path2"
+ NEW_RPATH "/path3")
+ set(rpath)
+ file(STRINGS "${f}" rpath REGEX "/path1:/path3" LIMIT_COUNT 1)
+ if(NOT rpath)
+ message(FATAL_ERROR "RPATH not updated in ${f}")
+ endif()
+
+ # Change the RPATH with compiler defined rpath removed
+ file(RPATH_CHANGE FILE "${f}"
+ OLD_RPATH "/path3"
+ NEW_RPATH "/rpath/sample"
+ INSTALL_REMOVE_ENVIRONMENT_RPATH)
+ set(rpath)
+ file(STRINGS "${f}" rpath REGEX "/rpath/sample" LIMIT_COUNT 1)
+ if(NOT rpath)
+ message(FATAL_ERROR "RPATH not updated in ${f}")
+ endif()
+ file(STRINGS "${f}" rpath REGEX "/path1" LIMIT_COUNT 1)
+ if(rpath)
+ message(FATAL_ERROR "RPATH not removed in ${f}")
+ endif()
+
# Remove the RPATH.
file(RPATH_REMOVE FILE "${f}")
set(rpath)