install_hdf5.sh 1.03 KB
Newer Older
Matthias Redies's avatar
Matthias Redies committed
1
hdf5_version=1.10.3
2
if [ ! -r CMake-hdf5-${hdf5_version}_${FC} ]
3 4
then
    #Get the file with the code
Matthias Redies's avatar
Matthias Redies committed
5 6
    curl -LO "https://github.com/MRedies/hdf5-mirror/raw/master/CMake-hdf5-${hdf5_version}.tar.gz"

7
    if [ ! -f CMake-hdf5-${hdf5_version}.tar.gz ]; then
Matthias Redies's avatar
Matthias Redies committed
8 9 10 11
        echo "No file found try source"
        curl -LO "http://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-${hdf5_version}/src/CMake-hdf5-${hdf5_version}.tar.gz"       
    fi
    
12
    tar xzf CMake-hdf5-${hdf5_version}.tar.gz
13 14
    mv CMake-hdf5-${hdf5_version} CMake-hdf5-${hdf5_version}_${FC}
    cd CMake-hdf5-${hdf5_version}_${FC}
15 16 17 18 19 20 21
    #copy options.cmake to adjust settings for compilation
    cp ../HDF5options.cmake .
    #Compile&test (This will take a while)
    ./build-unix.sh
    #Do make install 
    cd build
    make install
22 23
    cd ..
else
24
    cd CMake-hdf5-${hdf5_version}_${FC}
25 26
fi
#Store the installation location
27 28
FLEUR_LIBDIR="$PWD/HDF_Group/HDF5/${hdf5_version}/lib $FLEUR_LIBDIR"
FLEUR_INCLUDEDIR="$PWD/HDF_Group/HDF5/${hdf5_version}/include/static $FLEUR_INCLUDEDIR"