Skip to content

Commit

Permalink
changed when to use h5pcc for compiling hdf5-iotest
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Nov 13, 2024
1 parent 0d0554e commit 0042b10
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/external/hdf5_iotest/config.sh.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

export HDF5_ROOT=@HDF5_ROOT_PATH@
export LD_LIBRARY_PATH="${HDF5_ROOT}/lib:${LD_LIBRARY_PATH}"

cd hdf5-iotest
./autogen.sh
Expand All @@ -10,7 +9,22 @@ cd ..
rm -rf build
mkdir build
cd build
# The h5(p)cc wrapper correctly parses the hdf5-iotest compile command
# only in HDF5 versions >= 2.0.0
if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then
CC_DEF=mpicc
LIB_APPEND=""
if [ -d ${HDF5_ROOT}/lib64 ]; then
LIB_APPEND="64"
fi
export LD_LIBRARY_PATH="${HDF5_ROOT}/lib${LIB_APPEND}:$LD_LIBRARY_PATH"
export LDFLAGS="-L${HDF5_ROOT}/lib${LIB_APPEND}"
export CPPFLAGS="-I${HDF5_ROOT}/include"
export LIBS="-lhdf5"
else
CC_DEF=${HDF5_ROOT}/bin/h5pcc
fi
../hdf5-iotest/configure --silent \
CC=${HDF5_ROOT}/bin/h5pcc \
CC=${CC_DEF} \
CFLAGS="@CFLAGS@"

0 comments on commit 0042b10

Please sign in to comment.