Skip to content
Snippets Groups Projects
Commit f845d88f authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Re-introduce with-include and with-ldflags configuration options

parent 113a2400
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,9 @@ ENABLE_ILP64="yes"
FC_OPT=3
FC_DBG=" -ggdb"
FFLAGS=""
INCLUDEFLAGS=""
LAPACK="auto"
LDFLAGS=""
LIBMODE="static"
MAGMA="auto"
NVTXFLAGS=""
......@@ -88,8 +90,12 @@ function print_help {
echo "--with-fflags=FFLAGS Use specified FORTRAN compiler flags instead of "
echo " detected ones. "
echo "--with-hdf5=HDF5_PATH Use specified HDF5 distribution. "
echo "--with-include=[PATH] Use additional include paths (can be given more "
echo " than once). "
echo "--with-lapack Use LAPACK (DEFAULT). "
echo "--without-lapack Disable LAPACK. "
echo "--with-ldflags=[PATH] Use additional linker LDFLAGS (can be given more"
echo " than once). "
echo "--with-magma=[MAGMA] Use specified MAGMA distribution (DEFAULT). "
echo "--without-magma Disable MAGMA. "
echo " "
......@@ -192,10 +198,16 @@ do
echo "ERROR: option --with-hdf5 requires a valid HDF5 path."
exit 1
fi
elif [ "x$cut_arg" = "x--with-include" ]; then
user_flags=$(echo $arg | cut -d '=' -f2)
INCLUDEFLAGS="$INCLUDEFLAGS $user_flags"
elif [ "x$cut_arg" = "x--with-lapack" ]; then
LAPACK="yes"
elif [ "x$cut_arg" = "x--without-lapack" ]; then
LAPACK="no"
elif [ "x$cut_arg" = "x--with-ldflags" ]; then
user_flags=$(echo $arg | cut -d '=' -f2)
LDFLAGS="$LDFLAGS $user_flags"
elif [ "x$cut_arg" = "x--with-magma" ]; then
MAGMA="yes"
MAGMA_HOME=$(echo $arg | cut -d '=' -f2)
......@@ -766,13 +778,13 @@ else
fi
# End of offload checks
if [ "x$CXXFLAGS" = "x" ]; then
CXXFLAGS="-O${CXX_OPT}${CXX_DBG}${CLANGFLAGS}${HDF5FLAGS}${OMPFLAGS}${MPIFLAGS}${LAPACKFLAGS}${CUBLASFLAGS}${MAGMAFLAGS}${REFINEFLAGS}${DEBUGFLAGS}${OFFLOADFLAGS}"
CXXFLAGS="-O${CXX_OPT}${CXX_DBG}${CLANGFLAGS}${INCLUDEFLAGS}${HDF5FLAGS}${OMPFLAGS}${MPIFLAGS}${LAPACKFLAGS}${CUBLASFLAGS}${MAGMAFLAGS}${REFINEFLAGS}${DEBUGFLAGS}${OFFLOADFLAGS}"
fi
if [ "x$CXXLDFLAGS" = "x" ]; then
if [ "x$LIBMODE" = "xstatic" ]; then
CXXLDFLAGS="-Llibnptm -lnptm ${HDF5LDFLAGS} ${LAPACKLDFLAGS}${CUBLASLDFLAGS}${MAGMALDFLAGS}"
CXXLDFLAGS="-Llibnptm -lnptm ${HDF5LDFLAGS} ${LDFLAGS} ${LAPACKLDFLAGS}${CUBLASLDFLAGS}${MAGMALDFLAGS}"
else
CXXLDFLAGS="-Llibnptm -lnptm ${HDF5LDFLAGS} ${LAPACKLDFLAGS}${CUBLASLDFLAGS}${MAGMALDFLAGS}"
CXXLDFLAGS="-Llibnptm -lnptm ${HDF5LDFLAGS} ${LDFLAGS} ${LAPACKLDFLAGS}${CUBLASLDFLAGS}${MAGMALDFLAGS}"
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment