CMakeLists.txt 1.9 KB
Newer Older
T
tickduan 已提交
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
add_library (SZ
  src/ArithmeticCoding.c
  src/ByteToolkit.c
  src/CacheTable.c
  src/callZlib.c
  src/CompressElement.c
  src/conf.c
  src/dataCompression.c
  src/dictionary.c
  src/DynamicByteArray.c
  src/DynamicDoubleArray.c
  src/DynamicFloatArray.c
  src/DynamicIntArray.c
  src/Huffman.c
  src/iniparser.c
  src/MultiLevelCacheTable.c
  src/MultiLevelCacheTableWideInterval.c
  src/pastri.c
  src/exafelSZ.c
  src/rw.c
  src/rwf.c
  src/sz.c
  src/szd_double.c
  src/szd_double_pwr.c
  src/szd_double_ts.c
  src/szd_float.c
  src/szd_float_pwr.c
  src/szd_float_ts.c
  src/szd_int16.c
  src/szd_int32.c
  src/szd_int64.c
  src/szd_int8.c
  src/sz_double.c
  src/sz_double_pwr.c
  src/sz_double_ts.c
  src/szd_uint16.c
  src/szd_uint32.c
  src/szd_uint64.c
  src/szd_uint8.c
  src/szf.c
  src/sz_float.c
  src/sz_float_pwr.c
  src/sz_float_ts.c
  src/sz_int16.c
  src/sz_int32.c
  src/sz_int64.c
  src/sz_int8.c
  src/sz_omp.c
  src/sz_uint16.c
  src/sz_uint32.c
  src/sz_uint64.c
  src/sz_uint8.c
  src/TightDataPointStorageD.c
  src/TightDataPointStorageF.c
  src/TightDataPointStorageI.c
  src/TypeManager.c
  src/utility.c
  src/VarSet.c
  src/sz_stats.c
)

target_include_directories(SZ 
  PUBLIC 
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/sz>
  )


target_compile_options(SZ
	PRIVATE $<$<CONFIG:Debug>:-Wall -Wextra -Wpedantic -Wno-unused-parameter>
	)

if(BUILD_PASTRI)
  target_compile_definitions(SZ PUBLIC HAVE_PASTRI)
endif()
if(BUILD_TIMECMPR)
  target_compile_definitions(SZ PUBLIC HAVE_TIMECMPR)
endif()
if(BUILD_RANDOMACCESS)
  target_compile_definitions(SZ PUBLIC HAVE_RANDOMACCESS)
endif()
if(BUILD_FORTRAN)
  enable_language(Fortran)
  target_sources(SZ PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/src/rw_interface.F90
    ${CMAKE_CURRENT_SOURCE_DIR}/src/sz_interface.F90
  )
endif()
if(BUILD_STATS)
  target_compile_definitions(SZ PUBLIC HAVE_WRITESTATS)
endif()