summaryrefslogtreecommitdiff
path: root/Utilities/cmzstd
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-12 13:39:10 -0400
committerBrad King <brad.king@kitware.com>2019-03-13 10:47:16 -0400
commit2cf29217492a951ee40c17f855faa48aa26098f8 (patch)
treec8e085851b24e90658e5b607139e436c0ab63f08 /Utilities/cmzstd
parentf92b4b52ebb335ce540966d7f198df3878f6f46f (diff)
downloadcmake-2cf29217492a951ee40c17f855faa48aa26098f8.tar.gz
zstd: Add CMake build system
Although the upstream has a CMake build system, it is meant for the complete package. Add a simple one to build just the static library we need within CMake.
Diffstat (limited to 'Utilities/cmzstd')
-rw-r--r--Utilities/cmzstd/CMakeLists.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/Utilities/cmzstd/CMakeLists.txt b/Utilities/cmzstd/CMakeLists.txt
new file mode 100644
index 0000000000..b1399bd50d
--- /dev/null
+++ b/Utilities/cmzstd/CMakeLists.txt
@@ -0,0 +1,44 @@
+project(zstd C)
+
+# Disable warnings to avoid changing 3rd party code.
+if(CMAKE_C_COMPILER_ID MATCHES
+ "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel)$")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
+endif()
+
+include_directories(lib lib/common)
+
+add_library(cmzstd STATIC
+ lib/common/entropy_common.c
+ lib/common/error_private.c
+ lib/common/fse_decompress.c
+ lib/common/pool.c
+ lib/common/threading.c
+ lib/common/xxhash.c
+ lib/common/zstd_common.c
+ lib/compress/fse_compress.c
+ lib/compress/hist.c
+ lib/compress/huf_compress.c
+ lib/compress/zstd_compress.c
+ lib/compress/zstd_double_fast.c
+ lib/compress/zstd_fast.c
+ lib/compress/zstd_lazy.c
+ lib/compress/zstd_ldm.c
+ lib/compress/zstdmt_compress.c
+ lib/compress/zstd_opt.c
+ lib/decompress/huf_decompress.c
+ lib/decompress/zstd_ddict.c
+ lib/decompress/zstd_decompress_block.c
+ lib/decompress/zstd_decompress.c
+ lib/deprecated/zbuff_common.c
+ lib/deprecated/zbuff_compress.c
+ lib/deprecated/zbuff_decompress.c
+ lib/dictBuilder/cover.c
+ lib/dictBuilder/divsufsort.c
+ lib/dictBuilder/fastcover.c
+ lib/dictBuilder/zdict.c
+ )
+
+install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmzstd)