summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install
diff options
context:
space:
mode:
authorDennis Klein <d.klein@gsi.de>2019-05-27 20:00:43 (GMT)
committerDennis Klein <d.klein@gsi.de>2019-06-13 14:41:04 (GMT)
commit9e84c7c5e8e243624858692bddb6f13485f46774 (patch)
tree230eab866ac2582c04bcf6f9e5bacd9aaf8ba507 /Tests/RunCMake/install
parentb7d72db89de6a9ddc8c8740a6e8b8980d108b900 (diff)
downloadCMake-9e84c7c5e8e243624858692bddb6f13485f46774.zip
CMake-9e84c7c5e8e243624858692bddb6f13485f46774.tar.gz
CMake-9e84c7c5e8e243624858692bddb6f13485f46774.tar.bz2
cmInstallTargetGenerator: Introduce CMP0095
Escape coincidental CMake syntax in RPATH entries when generating the intermediary cmake_install.cmake script. Fixes #19225
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake3
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake9
2 files changed, 7 insertions, 5 deletions
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake
index 6e718f8..6567438 100644
--- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux-notfile.cmake
@@ -1,4 +1,5 @@
enable_language(C)
+cmake_policy(SET CMP0095 NEW)
file(WRITE "${CMAKE_BINARY_DIR}/test.c" "void test(void) {}\n")
file(WRITE "${CMAKE_BINARY_DIR}/main.c" [[extern void test(void);
@@ -13,7 +14,7 @@ int main(void)
add_library(test SHARED "${CMAKE_BINARY_DIR}/test.c")
add_executable(exe "${CMAKE_BINARY_DIR}/main.c")
target_link_libraries(exe PRIVATE test)
-set_property(TARGET exe PROPERTY INSTALL_RPATH "\\\${ORIGIN}/../lib")
+set_property(TARGET exe PROPERTY INSTALL_RPATH "\${ORIGIN}/../lib")
install(TARGETS exe DESTINATION bin)
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake
index 433dd3b..bd0f9f1 100644
--- a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-linux.cmake
@@ -1,4 +1,5 @@
enable_language(C)
+cmake_policy(SET CMP0095 NEW)
set(test_rpath_names
preexcluded
@@ -52,8 +53,8 @@ target_link_libraries(test_rpath PRIVATE ${test_rpath_names})
set_property(TARGET test_rpath PROPERTY INSTALL_RPATH
"${CMAKE_BINARY_DIR}/root-all/lib/rpath_postexcluded"
"${CMAKE_BINARY_DIR}/root-all/lib/rpath"
- "\\\$ORIGIN/rpath_origin_postexcluded"
- "\\\${ORIGIN}/rpath_origin" # This must be double-escaped because of issue #19225.
+ "\$ORIGIN/rpath_origin_postexcluded"
+ "\${ORIGIN}/rpath_origin"
"${CMAKE_BINARY_DIR}/root-all/lib/conflict"
)
target_link_options(test_rpath PRIVATE -Wl,--disable-new-dtags)
@@ -88,8 +89,8 @@ set_property(TARGET test_runpath PROPERTY INSTALL_RPATH
"${CMAKE_BINARY_DIR}/root-all/lib/runpath/../rpath" # Ensure that files that don't conflict are treated correctly
"${CMAKE_BINARY_DIR}/root-all/lib/runpath_postexcluded"
"${CMAKE_BINARY_DIR}/root-all/lib/runpath"
- "\\\${ORIGIN}/runpath_origin_postexcluded" # This must be double-escaped because of issue #19225.
- "\\\$ORIGIN/runpath_origin"
+ "\${ORIGIN}/runpath_origin_postexcluded"
+ "\$ORIGIN/runpath_origin"
"${CMAKE_BINARY_DIR}/root-all/lib/conflict2"
)
target_link_options(test_runpath PRIVATE -Wl,--enable-new-dtags)