summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack
diff options
context:
space:
mode:
authorRodolfo Lima <rlima@nvidia.com>2021-01-18 18:28:46 (GMT)
committerRodolfo Lima <rlima@nvidia.com>2021-01-26 15:23:37 (GMT)
commitbdf30bdad8dfad258bbc8d387a91f66bee3d0c0f (patch)
tree7b818b22b22c9e35bd04e68a851b3d39cd70bf6f /Tests/RunCMake/CPack
parentbcdb5b52a06cb98bd09da7410488ff9d5617b27f (diff)
downloadCMake-bdf30bdad8dfad258bbc8d387a91f66bee3d0c0f.zip
CMake-bdf30bdad8dfad258bbc8d387a91f66bee3d0c0f.tar.gz
CMake-bdf30bdad8dfad258bbc8d387a91f66bee3d0c0f.tar.bz2
CPack: add CPACK_THREADS variable to control compression threads
This allows setting how many threads the compressor will use. Currently only implemented for XZ when using system's lzma library. Fixes: #21715
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED/DEB-Prerequirements.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/DEB-Prerequirements.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake2
5 files changed, 6 insertions, 4 deletions
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 530bcdf..15bfb60 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -21,8 +21,8 @@ run_cpack_test(LONG_FILENAMES "DEB.LONG_FILENAMES" false "MONOLITHIC")
run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM.MAIN_COMPONENT" false "COMPONENT")
run_cpack_test(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
run_cpack_test_package_target(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
-run_cpack_test_package_target(THREADED_ALL "TXZ" false "MONOLITHIC;COMPONENT")
-run_cpack_test_package_target(THREADED "TXZ" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(THREADED_ALL "TXZ;DEB" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(THREADED "TXZ;DEB" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM.PARTIALLY_RELOCATABLE_WARNING" false "COMPONENT")
run_cpack_test(PER_COMPONENT_FIELDS "RPM.PER_COMPONENT_FIELDS;DEB.PER_COMPONENT_FIELDS" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/THREADED/DEB-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/THREADED/DEB-Prerequirements.cmake
new file mode 100644
index 0000000..7b2692c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED/DEB-Prerequirements.cmake
@@ -0,0 +1 @@
+set(CPACK_DEBIAN_COMPRESSION_TYPE xz)
diff --git a/Tests/RunCMake/CPack/tests/THREADED/test.cmake b/Tests/RunCMake/CPack/tests/THREADED/test.cmake
index 78fc9e9..9e82e8c 100644
--- a/Tests/RunCMake/CPack/tests/THREADED/test.cmake
+++ b/Tests/RunCMake/CPack/tests/THREADED/test.cmake
@@ -1,6 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
-set(CPACK_ARCHIVE_THREADS 2)
+set(CPACK_THREADS 2)
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)
diff --git a/Tests/RunCMake/CPack/tests/THREADED_ALL/DEB-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/DEB-Prerequirements.cmake
new file mode 100644
index 0000000..7b2692c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/DEB-Prerequirements.cmake
@@ -0,0 +1 @@
+set(CPACK_DEBIAN_COMPRESSION_TYPE xz)
diff --git a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
index 34051b8..6f37201 100644
--- a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
@@ -1,6 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
-set(CPACK_ARCHIVE_THREADS 0)
+set(CPACK_THREADS 0)
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)