summaryrefslogtreecommitdiff
path: root/Utilities/cmliblzma
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2021-04-16 18:03:22 +0200
committerBrad King <brad.king@kitware.com>2021-04-22 15:40:06 -0400
commit5380d858ff4cb21ae1a8777a9b721af97f598c37 (patch)
treeb7d2283b0da04084243d56304232d53645f710b3 /Utilities/cmliblzma
parente9065e96dc80ee62fa9bf9df559d0d8e6d8e0117 (diff)
downloadcmake-5380d858ff4cb21ae1a8777a9b721af97f598c37.tar.gz
liblzma: Enable multi threaded stream encoding support
Diffstat (limited to 'Utilities/cmliblzma')
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt12
-rw-r--r--Utilities/cmliblzma/liblzma/common/common.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index 5dd7035da3..4820a8fd01 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -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
diff --git a/Utilities/cmliblzma/liblzma/common/common.h b/Utilities/cmliblzma/liblzma/common/common.h
index dde3ae0eca..b3d3b7a059 100644
--- a/Utilities/cmliblzma/liblzma/common/common.h
+++ b/Utilities/cmliblzma/liblzma/common/common.h
@@ -14,6 +14,7 @@
#define LZMA_COMMON_H
#include "sysdefs.h"
+#include "mythread.h"
#include "tuklib_integer.h"
#if defined(_WIN32) || defined(__CYGWIN__)