diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-24 15:17:45 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-02-24 15:17:45 (GMT) |
commit | 18e02ace5b2c2318252acea5f53062ef8bd0e3c6 (patch) | |
tree | 2fd11fc551fa2e1da1a21f11ba20cdc73f22e27b /Tests/RunCMake/install | |
parent | 35ca2d524befc71b840808cce4e0a773ef722b71 (diff) | |
download | CMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.zip CMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.tar.gz CMake-18e02ace5b2c2318252acea5f53062ef8bd0e3c6.tar.bz2 |
install(CODE|SCRIPT): Support $<INSTALL_PREFIX> genex
Fixes: #24534
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/install/SCRIPT-all-check.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/install/SCRIPT.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/install/empty3.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/install/empty4.cmake | 1 |
5 files changed, 13 insertions, 2 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index fa61bdb..e5a0413 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -166,7 +166,6 @@ unset(RunCMake_TEST_OPTIONS) run_install_test(Deprecated) run_install_test(PRE_POST_INSTALL_SCRIPT) -run_install_test(SCRIPT) run_install_test(TARGETS-CONFIGURATIONS) run_install_test(DIRECTORY-PATTERN) run_install_test(TARGETS-Parts) @@ -174,6 +173,10 @@ run_install_test(FILES-PERMISSIONS) run_install_test(TARGETS-RPATH) run_install_test(InstallRequiredSystemLibraries) +set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0087:STRING=NEW") +run_install_test(SCRIPT) +unset(RunCMake_TEST_OPTIONS) + if(UNIX) run_install_test(DIRECTORY-symlink-clobber) endif() diff --git a/Tests/RunCMake/install/SCRIPT-all-check.cmake b/Tests/RunCMake/install/SCRIPT-all-check.cmake index 48d8e1a..b9c38e3 100644 --- a/Tests/RunCMake/install/SCRIPT-all-check.cmake +++ b/Tests/RunCMake/install/SCRIPT-all-check.cmake @@ -1 +1 @@ -check_installed([[^empty1.txt;empty2.txt$]]) +check_installed([[^empty1.txt;empty2.txt;empty3.cmake;empty3.txt;empty4.cmake;empty4.txt$]]) diff --git a/Tests/RunCMake/install/SCRIPT.cmake b/Tests/RunCMake/install/SCRIPT.cmake index f857b54..ee0c80e 100644 --- a/Tests/RunCMake/install/SCRIPT.cmake +++ b/Tests/RunCMake/install/SCRIPT.cmake @@ -1,4 +1,10 @@ install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/empty3.cmake ${CMAKE_CURRENT_SOURCE_DIR}/empty4.cmake + DESTINATION . + ) +install( SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/install_script.cmake" CODE "write_empty_file(empty2.txt)" + SCRIPT "$<INSTALL_PREFIX>/empty3.cmake" + CODE [[include($<INSTALL_PREFIX>/empty4.cmake)]] ) diff --git a/Tests/RunCMake/install/empty3.cmake b/Tests/RunCMake/install/empty3.cmake new file mode 100644 index 0000000..18c2ac5 --- /dev/null +++ b/Tests/RunCMake/install/empty3.cmake @@ -0,0 +1 @@ +write_empty_file(empty3.txt) diff --git a/Tests/RunCMake/install/empty4.cmake b/Tests/RunCMake/install/empty4.cmake new file mode 100644 index 0000000..026a4d2 --- /dev/null +++ b/Tests/RunCMake/install/empty4.cmake @@ -0,0 +1 @@ +write_empty_file(empty4.txt) |