From 11ca374b284603278eded2548bbc9d7de88706e9 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 13 Jul 2018 09:08:40 -0400 Subject: Tests: Add test for install(SCRIPT ... COMPONENT) --- Tests/RunCMake/install/RunCMakeTest.cmake | 1 + Tests/RunCMake/install/SCRIPT-COMPONENT-all-check.cmake | 1 + Tests/RunCMake/install/SCRIPT-COMPONENT-dev-check.cmake | 1 + Tests/RunCMake/install/SCRIPT-COMPONENT-uns-check.cmake | 1 + Tests/RunCMake/install/SCRIPT-COMPONENT.cmake | 5 +++++ 5 files changed, 9 insertions(+) create mode 100644 Tests/RunCMake/install/SCRIPT-COMPONENT-all-check.cmake create mode 100644 Tests/RunCMake/install/SCRIPT-COMPONENT-dev-check.cmake create mode 100644 Tests/RunCMake/install/SCRIPT-COMPONENT-uns-check.cmake create mode 100644 Tests/RunCMake/install/SCRIPT-COMPONENT.cmake diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 2999951..91524a6 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -95,3 +95,4 @@ set(run_install_test_components 1) run_install_test(FILES-EXCLUDE_FROM_ALL) run_install_test(TARGETS-EXCLUDE_FROM_ALL) run_install_test(TARGETS-NAMELINK_COMPONENT) +run_install_test(SCRIPT-COMPONENT) diff --git a/Tests/RunCMake/install/SCRIPT-COMPONENT-all-check.cmake b/Tests/RunCMake/install/SCRIPT-COMPONENT-all-check.cmake new file mode 100644 index 0000000..48d8e1a --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT-COMPONENT-all-check.cmake @@ -0,0 +1 @@ +check_installed([[^empty1.txt;empty2.txt$]]) diff --git a/Tests/RunCMake/install/SCRIPT-COMPONENT-dev-check.cmake b/Tests/RunCMake/install/SCRIPT-COMPONENT-dev-check.cmake new file mode 100644 index 0000000..48d8e1a --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT-COMPONENT-dev-check.cmake @@ -0,0 +1 @@ +check_installed([[^empty1.txt;empty2.txt$]]) diff --git a/Tests/RunCMake/install/SCRIPT-COMPONENT-uns-check.cmake b/Tests/RunCMake/install/SCRIPT-COMPONENT-uns-check.cmake new file mode 100644 index 0000000..e09a102 --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT-COMPONENT-uns-check.cmake @@ -0,0 +1 @@ +check_installed([[^$]]) diff --git a/Tests/RunCMake/install/SCRIPT-COMPONENT.cmake b/Tests/RunCMake/install/SCRIPT-COMPONENT.cmake new file mode 100644 index 0000000..aaa9bd4 --- /dev/null +++ b/Tests/RunCMake/install/SCRIPT-COMPONENT.cmake @@ -0,0 +1,5 @@ +install( + SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/install_script.cmake" + CODE "write_empty_file(empty2.txt)" + COMPONENT dev + ) -- cgit v0.12