Skip to content

Commit

Permalink
handle static hdf5 build
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Feb 29, 2024
1 parent 092190c commit 126e106
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
9 changes: 9 additions & 0 deletions config.make
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ ifeq ($(shell grep H5Dwrite_chunk $(HDF5_INC)/*.h),)
HDF5_HAS_WRITE_CHUNK = 0
endif

HDF5_IS_STATIC_ONLY = 1
ifneq ($(wildcard $(HDF5_LIB)/libhdf5.so),)
HDF5_IS_STATIC_ONLY = 0
else ifneq ($(wildcard $(HDF5_LIB)/libhdf5.dylib),)
HDF5_IS_STATIC_ONLY = 0
else ifneq ($(wildcard $(HDF5_LIB)/libhdf5.dll),)
HDF5_IS_STATIC_ONLY = 0
endif

ifeq ($(PREFIX),)
PREFIX := $(shell pwd)/install
endif
Expand Down
2 changes: 2 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Compiling ZFP_
Compiling HDF5_
^^^^^^^^^^^^^^^

* If you want to test the plugin as a dynamically loaded plugin, the HDF5_ library must NOT be configured with ``--disable-shared``.

* If you want to be able to run the fortran tests for this filter, HDF5_ must be configured with *both* the ``--enable-fortran`` and ``--enable-fortran2003`` configuration switches.
Otherwise, any vanilla installation of HDF5_ is acceptable.

Expand Down
12 changes: 8 additions & 4 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -725,11 +725,15 @@ ifneq ($(ZFP_HAS_REVERSIBLE),)
LIB_CHECK += test-lib-reversible
endif

PLUGIN_CHECK = test-rate test-accuracy test-precision test-h5repack
ifneq ($(ZFP_HAS_REVERSIBLE),)
PLUGIN_CHECK += test-reversible
# Only do plugin tests if HDF5 is built for shared libs
PLUGIN_CHECK =
ifneq ($(HDF5_IS_STATIC_ONLY),1)
PLUGIN_CHECK = test-rate test-accuracy test-precision test-h5repack
ifneq ($(ZFP_HAS_REVERSIBLE),)
PLUGIN_CHECK += test-reversible
endif
PLUGIN_CHECK += test-endian test-endian1
endif
PLUGIN_CHECK += test-endian test-endian1

CHECK = $(LIB_CHECK) $(PLUGIN_CHECK)
ifneq ($(FC),)
Expand Down

0 comments on commit 126e106

Please sign in to comment.