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
This commit is contained in:
Rodolfo Lima
2021-01-18 19:28:46 +01:00
parent bcdb5b52a0
commit bdf30bdad8
12 changed files with 83 additions and 9 deletions
+2
View File
@@ -80,6 +80,8 @@ CPack generators which are essentially archives at their core. These include:
not all compression modes support threading in all environments. Currently,
only the XZ compression may support it.
See also the :variable:`CPACK_THREADS` variable.
.. note::
Official CMake binaries available on ``cmake.org`` ship with a ``liblzma``
@@ -0,0 +1,6 @@
cpack-compression-threads
-------------------------
* :module:`CPack` gained the :variable:`CPACK_THREADS` variable to
control the number of threads used for parallelized operations,
such as compressing the installer package.