summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-05-26 22:53:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-26 22:53:40 (GMT)
commit445c73d3fadea0dcc0b52f25ead9afbcd926631b (patch)
treed66d20ce91d286f99c825dfa2c84782b42f1c84c /Tests
parentc5657a2fe42a0de7a5724507888f9f6f1afff8ea (diff)
parent26e36111d326bbf69f437ef1335423ea3b2835e2 (diff)
downloadCMake-445c73d3fadea0dcc0b52f25ead9afbcd926631b.zip
CMake-445c73d3fadea0dcc0b52f25ead9afbcd926631b.tar.gz
CMake-445c73d3fadea0dcc0b52f25ead9afbcd926631b.tar.bz2
Merge topic 'cpack-install-opts'
26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6141
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake7
3 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index a3c72a1..746ff8b 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -37,6 +37,7 @@ unset(ENVIRONMENT)
run_cpack_test(USER_FILELIST "RPM.USER_FILELIST" false "MONOLITHIC")
run_cpack_test(MD5SUMS "DEB.MD5SUMS" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(CPACK_INSTALL_SCRIPTS "singular;plural;both" "ZIP" false "MONOLITHIC")
+run_cpack_test(CPACK_CUSTOM_INSTALL_VARIABLES "ZIP" false "MONOLITHIC")
run_cpack_test(DEB_PACKAGE_VERSION_BACK_COMPATIBILITY "DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(EXTERNAL "none;good;good_multi;bad_major;bad_minor;invalid_good;invalid_bad;stage_and_package" "External" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(
diff --git a/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake
new file mode 100644
index 0000000..a05513b
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/ExpectedFiles.cmake
@@ -0,0 +1,7 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST
+ "/foo"
+ "/foo/bar.txt"
+ "/foo/baz.txt"
+ "/foo/foo.txt"
+)
diff --git a/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake
new file mode 100644
index 0000000..4a12f19
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake
@@ -0,0 +1,7 @@
+set(CPACK_CUSTOM_INSTALL_VARIABLES "FOO=foo.txt" "BAR=bar.txt")
+
+install(CODE [[
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${FOO})
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${BAR})
+ file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/baz.txt)
+]])