File: CMakeLists.txt

package info (click to toggle)
cmake 4.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152,456 kB
  • sloc: ansic: 403,896; cpp: 303,920; sh: 4,105; python: 3,583; yacc: 3,106; lex: 1,279; f90: 538; asm: 471; lisp: 375; cs: 270; java: 266; fortran: 239; objc: 215; perl: 213; xml: 198; makefile: 111; javascript: 83; pascal: 63; tcl: 55; php: 25; ruby: 22
file content (55 lines) | stat: -rw-r--r-- 1,700 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
project(zstd C)

# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
    "^(GNU|LCC|Clang|AppleClang|IBMClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
  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_literals.c
  lib/compress/zstd_compress.c
  lib/compress/zstd_compress_sequences.c
  lib/compress/zstd_compress_superblock.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
  )

target_compile_definitions(cmzstd PRIVATE
  # BMI2 instructions are not supported in older environments.
  DYNAMIC_BMI2=0
  # Explicitly disable ASM build to work with more compilers.
  # Our vendored zstd does not include the assembly language file.
  ZSTD_DISABLE_ASM=1
  )

install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmzstd)