Commit ff489e95 authored by Daniel Wortmann's avatar Daniel Wortmann

Removed libxc and hdf5 as options for -external. Use -hdf5 true/-libxc true instead

parent a3b855fc
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
#############################################################################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
#############################################################################################
### uncomment/comment and change the following lines for other configuration options
#############################################################################################
#### alternate toolsets ####
#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
#############################################################################################
#### Only build static libraries ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
#### Add PICC option on linux/mac ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
#############################################################################################
#### fortran enabled ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
#### fortran disabled ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
#############################################################################################
#### java enabled ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")
#### java disabled ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
#############################################################################################
### change install prefix (default use INSTALLDIR value)
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
#############################################################################################
#### ext libraries ####
### ext libs from tgz
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
### ext libs from git
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
### ext libs on system
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
### disable ext zlib building
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
### disable ext szip building
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#############################################################################################
### disable test program builds
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
#############################################################################################
### disable packaging
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
### Create install package with external libraries (szip, zlib)
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
#############################################################################################
hdf5_version=1.10.3
if [ ! -r CMake-hdf5-${hdf5_version}_${FC} ]
then
#Get the file with the code
curl -LO "https://github.com/MRedies/hdf5-mirror/raw/master/CMake-hdf5-${hdf5_version}.tar.gz"
if [ ! -f CMake-hdf5-${hdf5_version}.tar.gz ]; then
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
tar xzf CMake-hdf5-${hdf5_version}.tar.gz
mv CMake-hdf5-${hdf5_version} CMake-hdf5-${hdf5_version}_${FC}
cd CMake-hdf5-${hdf5_version}_${FC}
#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
cd ..
else
cd CMake-hdf5-${hdf5_version}_${FC}
fi
#Store the installation location
FLEUR_LIBDIR="$PWD/HDF_Group/HDF5/${hdf5_version}/lib $FLEUR_LIBDIR"
FLEUR_INCLUDEDIR="$PWD/HDF_Group/HDF5/${hdf5_version}/include/static $FLEUR_INCLUDEDIR"
libxc_version=4.2.1
if [ ! -d libxc-${libxc_version}_${FC} ]
then
#Get the file with the code
curl --connect-timeout 10 -LO "https://github.com/MRedies/libxc-mirror/raw/master/libxc-${libxc_version}.tar.gz"
if [ ! -f libxc-${libxc_version}.tar.gz ]; then
echo "No file found try source"
curl --connect-timeout 10 -LO "http://www.tddft.org/programs/octopus/download/libxc/${libxc_version}/libxc-${libxc_version}.tar.gz"
fi
tar xzf libxc-${libxc_version}.tar.gz
mv libxc-${libxc_version} libxc-${libxc_version}_${FC}
cd libxc-${libxc_version}_${FC}
#Compile&test (This will take a while)
./configure --prefix=$PWD/INSTALL_DIR
make -j
make install
else
cd libxc-${libxc_version}_${FC}
fi
#Store the installation location
FLEUR_LIBDIR="$PWD/INSTALL_DIR/lib $FLEUR_LIBDIR"
FLEUR_INCLUDEDIR="$PWD/INSTALL_DIR/include $FLEUR_INCLUDEDIR"
if [ $FLEUR_LIBRARIES ]
then
FLEUR_LIBRARIES="$FLEUR_LIBRARIES;-lxcf03;-lxc"
else
FLEUR_LIBRARIES="-lxcf03;-lxc"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment