Skip to content

Commit

Permalink
Merge commit 'b86055454903bcac6e9f0958075c4d8197e23d61' into update-d…
Browse files Browse the repository at this point in the history
…ependencies
  • Loading branch information
t20100 committed Jul 4, 2024
2 parents e475b44 + b860554 commit 6f1bcbb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
20 changes: 16 additions & 4 deletions src/SZ/sz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,23 @@ set_target_properties (SZ PROPERTIES
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
)

target_link_libraries (SZ PUBLIC ${ZLIB_dep} ${ZSTD_dep} m)
if (WIN32 AND NOT MINGW)
target_link_libraries (SZ PUBLIC ${ZLIB_dep} ${ZSTD_dep})
else ()
target_link_libraries (SZ PUBLIC ${ZLIB_dep} ${ZSTD_dep} m)
endif ()

target_compile_options(SZ
PRIVATE $<$<CONFIG:Debug>:-Wall -Wextra -Wpedantic -Wno-unused-parameter>
)
if (WIN32 AND NOT MINGW)
message(STATUS "Native windows compiler detected, adding compile flags")
target_compile_options(SZ
PRIVATE $<$<CONFIG:Debug>:-Wall>
)
else ()
message(STATUS "GCC detected, adding compile flags")
target_compile_options(SZ
PRIVATE $<$<CONFIG:Debug>:-Wall -Wextra -Wpedantic -Wno-unused-parameter>
)
endif()

if(BUILD_OPENMP)
target_link_libraries(SZ PRIVATE OpenMP::OpenMP_C)
Expand Down
11 changes: 10 additions & 1 deletion src/SZ/sz/src/sz.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,16 @@ unsigned char *SZ_compress_rev(int dataType, void *data, void *reservedValue, si

void *SZ_decompress(int dataType, unsigned char *bytes, size_t byteLength, size_t r5, size_t r4, size_t r3, size_t r2, size_t r1)
{
if(confparams_dec==NULL)
//correct dimension if needed
size_t _r[5];
filterDimension(r5, r4, r3, r2, r1, _r);
r5 = _r[4];
r4 = _r[3];
r3 = _r[2];
r2 = _r[1];
r1 = _r[0];

if(confparams_dec==NULL)
confparams_dec = (sz_params*)malloc(sizeof(sz_params));
memset(confparams_dec, 0, sizeof(sz_params));
if(exe_params==NULL)
Expand Down
4 changes: 4 additions & 0 deletions src/SZ/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ else ()
set (BUILD_EXT_LIBS_TYPE "STATIC")
endif ()

if (WIN32 AND NOT MINGW)
set (BUILD_EXT_LIBS_TYPE "STATIC")
endif ()

add_library(ZLIB ${BUILD_EXT_LIBS_TYPE}
./gzclose.c
./uncompr.c
Expand Down
4 changes: 4 additions & 0 deletions src/SZ/zstd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ else ()
set (BUILD_EXT_LIBS_TYPE "STATIC")
endif ()

if (WIN32 AND NOT MINGW)
set (BUILD_EXT_LIBS_TYPE "STATIC")
endif ()

add_library(zstd ${BUILD_EXT_LIBS_TYPE}
./common/entropy_common.c
./common/pool.c
Expand Down

0 comments on commit 6f1bcbb

Please sign in to comment.