Skip to content

Commit

Permalink
Merge commit '70a7c2bf008b3ab915374aa614d90014f210f592' 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 df6f2fc + 70a7c2b commit eb6880f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/hdf5-blosc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.10)
cmake_policy(SET CMP0074 NEW)
project(blosc_hdf5)
include(ExternalProject)
include(GNUInstallDirs)

# options
option(BUILD_TESTS
Expand All @@ -9,7 +11,7 @@ option(BUILD_TESTS
option(BUILD_PLUGIN
"Build dynamically loadable plugin for HDF5 version > 1.8.11" ON)
if(BUILD_PLUGIN)
set(PLUGIN_INSTALL_PATH "/usr/local/hdf5/lib/plugin" CACHE PATH
set(PLUGIN_INSTALL_PATH "/usr/local/hdf5/lib/plugin" CACHE PATH
"Where to install the dynamic HDF5-plugin")
endif(BUILD_PLUGIN)

Expand All @@ -25,6 +27,7 @@ message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
ExternalProject_Add(project_blosc
PREFIX ${BLOSC_PREFIX}
GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
GIT_TAG main
INSTALL_DIR ${BLOSC_INSTALL_DIR}
CMAKE_ARGS ${BLOSC_CMAKE_ARGS}
)
Expand Down Expand Up @@ -52,7 +55,7 @@ include_directories(${HDF5_INCLUDE_DIRS})

# add blosc libraries
add_library(blosc_shared SHARED IMPORTED)
set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
add_dependencies(blosc_shared project_blosc)
include_directories(${BLOSC_INSTALL_DIR}/include)

Expand Down
2 changes: 1 addition & 1 deletion src/hdf5-blosc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Instead of just linking this Blosc filter into your HDF5 application, it is poss
it as a system-wide HDF5 plugin (with HDF5 1.8.11 or later). This is useful because it allows
*every* HDF5-using program on your system to transparently read Blosc-compressed HDF5 files.

As described in the `HDF5 plugin documentation <https://www.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf>`_, you just need to compile the Blosc plugin into a shared library and
As described in the `HDF5 plugin documentation <https://portal.hdfgroup.org/display/HDF5/HDF5+Dynamically+Loaded+Filters>`_, you just need to compile the Blosc plugin into a shared library and
copy it to the plugin directory (which defaults to ``/usr/local/hdf5/lib/plugin`` on non-Windows systems).

Following the ``cmake`` instructions below produces a ``libH5Zblosc.so`` shared library
Expand Down
9 changes: 9 additions & 0 deletions src/hdf5-blosc/RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
:Contact: [email protected]
:URL: http://www.blosc.org

Changes from 1.0.0 to 1.0.1
===========================

- Fix warnings related to const for blosc_filter.c. Thanks to
@matchy233. Closes #34.

- Fix build on systems where the libdir is lib64 instead of lib. Thanks to
Lehman Garrison.


Changes from 0.0.1 to 1.0.0
===========================
Expand Down
4 changes: 2 additions & 2 deletions src/hdf5-blosc/src/blosc_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ size_t blosc_filter(unsigned flags, size_t cd_nelmts,
int doshuffle = 1; /* Shuffle default */
int compcode; /* Blosc compressor */
int code;
char* compname = "blosclz"; /* The compressor by default */
char* complist;
const char* compname = "blosclz"; /* The compressor by default */
const char* complist;
char errmsg[256];

/* Filter params that are always set */
Expand Down
2 changes: 2 additions & 0 deletions src/hdf5-blosc/src/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ int main(){
/* Register the filter with the library */
r = register_blosc(&version, &date);
printf("Blosc version info: %s (%s)\n", version, date);
free(version);
free(date);

if(r<0) goto failed;

Expand Down

0 comments on commit eb6880f

Please sign in to comment.