From 9f7c1a9b5ecea325f782acd0997da39a3392917e Mon Sep 17 00:00:00 2001 From: Giovanni La Mura Date: Wed, 18 Dec 2024 17:20:54 +0100 Subject: [PATCH] Re-introduce definition of with-fflags configuration option --- build/configure.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/build/configure.sh b/build/configure.sh index 97545f0f..11c6a11a 100755 --- a/build/configure.sh +++ b/build/configure.sh @@ -10,6 +10,7 @@ DEBUGFLAGS="" ENABLE_ILP64="yes" FC_OPT=3 FC_DBG=" -ggdb" +FFLAGS="" LAPACK="auto" LIBMODE="static" MAGMA="auto" @@ -83,11 +84,13 @@ function print_help { echo "--enable-shared Use shared libraries (default is static). " echo "--help Print this help and exit. " echo "--with-cublas Use cuBLAS (DEFAULT). " + echo "--without-cublas Disable cuBLAS. " + 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-lapack Use LAPACK (DEFAULT). " - echo "--with-magma=[MAGMA] Use specified MAGMA distribution (DEFAULT). " - echo "--without-cublas Disable cuBLAS. " echo "--without-lapack Disable LAPACK. " + echo "--with-magma=[MAGMA] Use specified MAGMA distribution (DEFAULT). " echo "--without-magma Disable MAGMA. " echo " " echo "Some influential environment variables are: " @@ -178,6 +181,11 @@ do CUBLAS="yes" elif [ "x$cut_arg" = "x--without-cublas" ]; then CUBLAS="no" + elif [ "x$cut_arg" = "x--with-fflags" ]; then + custom_flags=$(echo $arg | cut -d '=' -f2) + if [ "x$custom_flags" != "x" ]; then + FFLAGS=$custom_flags + fi elif [ "x$cut_arg" = "x--with-hdf5" ]; then HDF5_HOME=$(echo $arg | cut -d '=' -f2) if [ "x${HDF5_HOME}" = "x" ]; then @@ -186,11 +194,6 @@ do fi elif [ "x$cut_arg" = "x--with-lapack" ]; then LAPACK="yes" - #LAPACKHOME=$(echo $arg | cut -d '=' -f2) - #if [ "x$LAPACKHOME" != "x" ]; then - # LAPACK_INCLUDE="$LAPACKHOME/include" - # LAPACK_LIB="$LAPACKHOME/lib" - #fi elif [ "x$cut_arg" = "x--without-lapack" ]; then LAPACK="no" elif [ "x$cut_arg" = "x--with-magma" ]; then @@ -764,6 +767,10 @@ if [ "x$CXXLDFLAGS" = "x" ]; then CXXLDFLAGS="-Llibnptm -lnptm ${HDF5LDFLAGS} ${LAPACKLDFLAGS}${CUBLASLDFLAGS}${MAGMALDFLAGS}" fi fi + +if [ "x$FFLAGS" != "x" ]; then + FCFLAGS=$FFLAGS +fi # End of configuration logic # Print a summary of configuration options -- GitLab