diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-07-11 21:03:30 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-07-17 13:07:01 (GMT) |
commit | ae1c917f1aa6e544f27c5e73ede0edb10da0c3ad (patch) | |
tree | dd5455af422b461c3c5c4d3bfafaad0213317b17 /Tests/RunCMake | |
parent | 2c62a45a5a11c624f4b1bb882831f696c51818f1 (diff) | |
download | CMake-ae1c917f1aa6e544f27c5e73ede0edb10da0c3ad.zip CMake-ae1c917f1aa6e544f27c5e73ede0edb10da0c3ad.tar.gz CMake-ae1c917f1aa6e544f27c5e73ede0edb10da0c3ad.tar.bz2 |
Tests: Add test for install(<SCRIPT|CODE>)
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/install/SCRIPT-all-check.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/install/SCRIPT.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/install/install_script.cmake | 5 |
4 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 5495d56..8bd3c99 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -83,6 +83,7 @@ unset(RunCMake_TEST_OPTIONS) run_install_test(Deprecated) run_install_test(PRE_POST_INSTALL_SCRIPT) +run_install_test(SCRIPT) set(run_install_test_components 1) run_install_test(FILES-EXCLUDE_FROM_ALL) diff --git a/Tests/RunCMake/install/SCRIPT-all-check.cmake b/Tests/RunCMake/install/SCRIPT-all-check.cmake new file mode 100644 index 0000000..48d8e1a --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT-all-check.cmake @@ -0,0 +1 @@ +check_installed([[^empty1.txt;empty2.txt$]]) diff --git a/Tests/RunCMake/install/SCRIPT.cmake b/Tests/RunCMake/install/SCRIPT.cmake new file mode 100644 index 0000000..f857b54 --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT.cmake @@ -0,0 +1,4 @@ +install( + SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/install_script.cmake" + CODE "write_empty_file(empty2.txt)" + ) diff --git a/Tests/RunCMake/install/install_script.cmake b/Tests/RunCMake/install/install_script.cmake new file mode 100644 index 0000000..1f8522c --- /dev/null +++ b/Tests/RunCMake/install/install_script.cmake @@ -0,0 +1,5 @@ +function(write_empty_file FILENAME) + file(WRITE "${CMAKE_INSTALL_PREFIX}/${FILENAME}" "") +endfunction() + +write_empty_file(empty1.txt) |