Commit 5380d858 authored by Nils Gladitz's avatar Nils Gladitz Committed by Brad King
Browse files

liblzma: Enable multi threaded stream encoding support

parent e9065e96
......@@ -579,6 +579,7 @@ macro (CMAKE_BUILD_UTILITIES)
set(LIBLZMA_INCLUDE_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmliblzma/liblzma/api")
set(LIBLZMA_LIBRARY cmliblzma)
set(HAVE_LZMA_STREAM_ENCODER_MT 1)
endif()
endif()
......
......@@ -82,7 +82,8 @@ CPack generators which are essentially archives at their core. These include:
See also the :variable:`CPACK_THREADS` variable.
.. note::
.. versionadded:: 3.21
Official CMake binaries available on ``cmake.org`` ship with a ``liblzma``
that does not support parallel compression.
Official CMake binaries available on ``cmake.org`` now ship
with a ``liblzma`` that supports parallel compression.
Older versions did not.
lzma-threads
------------
* The precompiled binaries provided on
`cmake.org <https://cmake.org/download/>`_ now support
``liblzma`` multi-threading. See the :variable:`CPACK_THREADS` and
:variable:`CPACK_ARCHIVE_THREADS` variables.
......@@ -299,10 +299,11 @@ installers. The most commonly-used variables are:
Currently only ``xz`` compression *may* take advantage of multiple cores. Other
compression methods ignore this value and use only one thread.
.. note::
.. versionadded:: 3.21
Official CMake binaries available on ``cmake.org`` ship with a ``liblzma``
that does not support parallel compression.
Official CMake binaries available on ``cmake.org`` now ship
with a ``liblzma`` that supports parallel compression.
Older versions did not.
Variables for Source Package Generators
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
......@@ -6,6 +6,12 @@ include(CheckSymbolExists)
include(CheckTypeSize)
include(TestBigEndian)
if(WIN32)
add_definitions(-DMYTHREAD_VISTA)
else()
add_definitions(-DMYTHREAD_POSIX)
endif()
CHECK_INCLUDE_FILE(byteswap.h HAVE_BYTESWAP_H)
CHECK_INCLUDE_FILE(limits.h HAVE_LIMITS_H)
CHECK_INCLUDE_FILE(memory.h HAVE_MEMORY_H)
......@@ -60,7 +66,10 @@ set(HAVE_MF_HC3 1)
set(HAVE_MF_HC4 1)
SET(LZMA_SRCS
common/mythread.h
common/sysdefs.h
common/tuklib_cpucores.c
common/tuklib_cpucores.h
common/tuklib_integer.h
liblzma/check/check.c
liblzma/check/crc32_fast.c
......@@ -91,14 +100,17 @@ SET(LZMA_SRCS
liblzma/common/filter_encoder.c
liblzma/common/filter_flags_decoder.c
liblzma/common/filter_flags_encoder.c
liblzma/common/hardware_cputhreads.c
liblzma/common/index.c
liblzma/common/index_decoder.c
liblzma/common/index_encoder.c
liblzma/common/index_hash.c
liblzma/common/outqueue.c
liblzma/common/stream_buffer_decoder.c
liblzma/common/stream_buffer_encoder.c
liblzma/common/stream_decoder.c
liblzma/common/stream_encoder.c
liblzma/common/stream_encoder_mt.c
liblzma/common/stream_flags_common.c
liblzma/common/stream_flags_decoder.c
liblzma/common/stream_flags_encoder.c
......
......@@ -14,6 +14,7 @@
#define LZMA_COMMON_H
#include "sysdefs.h"
#include "mythread.h"
#include "tuklib_integer.h"
#if defined(_WIN32) || defined(__CYGWIN__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment