Skip to content

Commit

Permalink
Bugfix: miniz upgrade (#22)
Browse files Browse the repository at this point in the history
* Do not include miniz.c inside source, avoids duplicate function defs

Miniz is compiled as separate source file.

* Compile miniz.c as source file

* Updated miniz from 1.15 to 2.1.

This fixes a number of compiler warnings/errors for gcc > 4.6.
  • Loading branch information
wdconinc authored Apr 21, 2020
1 parent 2f60b54 commit f05ccd6
Show file tree
Hide file tree
Showing 4 changed files with 8,322 additions and 4,236 deletions.
9 changes: 7 additions & 2 deletions KEMField/Source/IO/StructuredASCII/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ if (KEMField_USE_ZLIB)
kasper_external_include_directories (${ZLIB_INCLUDE_DIRS})
add_cflag(KEMFIELD_USE_ZLIB)
else (KEMField_USE_ZLIB)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.c PROPERTIES COMPILE_FLAGS -Wno-strict-aliasing)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.hh PROPERTIES COMPILE_FLAGS -Wno-strict-aliasing)
list (APPEND STRUCTUREDASCII_HEADERFILES
${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.c
)
endif (KEMField_USE_ZLIB)

Expand All @@ -68,6 +66,13 @@ set (STRUCTUREDASCII_SOURCEFILES
${CMAKE_CURRENT_SOURCE_DIR}/src/KSATestD.cc
)

if (NOT KEMField_USE_ZLIB)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.c PROPERTIES COMPILE_FLAGS -Wno-strict-aliasing)
list (APPEND STRUCTUREDASCII_SOURCEFILES
${CMAKE_CURRENT_SOURCE_DIR}/include/miniz.c
)
endif (NOT KEMField_USE_ZLIB)

##################################################

add_library (KEMStructuredASCII SHARED ${STRUCTUREDASCII_SOURCEFILES} ${STRUCTUREDASCII_HEADERFILES})
Expand Down
Loading

0 comments on commit f05ccd6

Please sign in to comment.