diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-07-11 20:33:12 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-07-17 13:07:01 (GMT) |
commit | db4bc2fa1814a230a8f58293a48465cba9a22a36 (patch) | |
tree | 01e4ff73c411a710f1e51b376e077188b0a09f40 /Tests/RunCMake | |
parent | ec5c838fcb04f672e3ec03547fb571d40e789fdd (diff) | |
download | CMake-db4bc2fa1814a230a8f58293a48465cba9a22a36.zip CMake-db4bc2fa1814a230a8f58293a48465cba9a22a36.tar.gz CMake-db4bc2fa1814a230a8f58293a48465cba9a22a36.tar.bz2 |
Tests: Add test for deprecated install_*() commands
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/install/Deprecated-all-check.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/install/Deprecated.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/install/RunCMakeTest.cmake | 2 | ||||
-rwxr-xr-x | Tests/RunCMake/install/script | 2 | ||||
-rwxr-xr-x | Tests/RunCMake/install/script.bat | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/Deprecated-all-check.cmake b/Tests/RunCMake/install/Deprecated-all-check.cmake new file mode 100644 index 0000000..9ea33a6 --- /dev/null +++ b/Tests/RunCMake/install/Deprecated-all-check.cmake @@ -0,0 +1 @@ +check_installed([[^bin;bin/myexe(\.exe)?;scripts1;scripts1/script;scripts1/script\.bat;scripts2;scripts2/script;scripts2/script\.bat;scripts3;scripts3/script;scripts3/script\.bat;src;src/empty\.c;src/obj1\.c;src/obj\2.c$]]) diff --git a/Tests/RunCMake/install/Deprecated.cmake b/Tests/RunCMake/install/Deprecated.cmake new file mode 100644 index 0000000..c435cb5 --- /dev/null +++ b/Tests/RunCMake/install/Deprecated.cmake @@ -0,0 +1,13 @@ +enable_language(C) + +add_executable(myexe main.c) + +install_files(/src FILES empty.c) +install_files(/src .c obj1) +install_files(/src "^obj2.c$") + +install_targets(/bin myexe) + +install_programs(/scripts1 FILES script script.bat) +install_programs(/scripts2 script script.bat) +install_programs(/scripts3 "^script(\.bat)?$") diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 5a15ee8..574bf1a 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -81,6 +81,8 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug") run_install_test(TARGETS-OUTPUT_NAME) unset(RunCMake_TEST_OPTIONS) +run_install_test(Deprecated) + set(run_install_test_components 1) run_install_test(FILES-EXCLUDE_FROM_ALL) run_install_test(TARGETS-EXCLUDE_FROM_ALL) diff --git a/Tests/RunCMake/install/script b/Tests/RunCMake/install/script new file mode 100755 index 0000000..81f9f53 --- /dev/null +++ b/Tests/RunCMake/install/script @@ -0,0 +1,2 @@ +#!/bin/sh +echo "Sample Script Output" diff --git a/Tests/RunCMake/install/script.bat b/Tests/RunCMake/install/script.bat new file mode 100755 index 0000000..a9af38c --- /dev/null +++ b/Tests/RunCMake/install/script.bat @@ -0,0 +1 @@ +@echo Sample Script Output |