diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index b99f37986b..718a1ce34b 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -22,7 +22,9 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<.. and set to use third-party + # The edit is slightly fragile, but works + expected="openmpi-[1-9][.0-9]*" + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + optMpi="$2" + _matches "$optMpi" "$expected" || die "'$1' option has bad value: '$optMpi'" + + _inlineSed etc/config.sh/mpi \ + "FOAM_MPI=$expected" \ + "FOAM_MPI=$optMpi" \ + "Replaced 'FOAM_MPI=$expected' setting by 'FOAM_MPI=$optMpi'" + + replace etc/bashrc WM_MPLIB OPENMPI + adjusted=true + shift + ;; + + -openmpi-system) + # Explicitly set WM_MPLIB=SYSTEMOPENMPI + replace etc/bashrc WM_MPLIB SYSTEMOPENMPI + optMpi=system + adjusted=true + ;; + + -openmpi-third) + # Explicitly set WM_MPLIB=OPENMPI, using default setting for openmpi + replace etc/bashrc WM_MPLIB OPENMPI + optMpi=third + adjusted=true + ;; + + +## Components ## + -boost) # Replace boost_version=... [ "$#" -ge 2 ] || die "'$1' option requires an argument" @@ -324,14 +424,6 @@ do shift ;; - -clang) - # Replace clang_version=... - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - replace etc/config.sh/compiler clang_version "$2" - adjusted=true - shift - ;; - -cmake) # Replace cmake_version=... [ "$#" -ge 2 ] || die "'$1' option requires an argument" @@ -340,66 +432,6 @@ do shift ;; - -mpi) - # Explicitly set WM_MPLIB=... - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - replace etc/bashrc WM_MPLIB "$2" - optMpi=system - adjusted=true - shift - ;; - - -openmpi) - # Replace FOAM_MPI=openmpi-.. and set to use third-party - # The edit is slightly fragile, but works - expected="openmpi-[1-9][.0-9]*" - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - optMpi="$2" - _matches "$optMpi" "$expected" || die "'$1' option has bad value: '$optMpi'" - - _inlineSed etc/config.sh/mpi \ - "FOAM_MPI=$expected" \ - "FOAM_MPI=$optMpi" \ - "Replaced 'FOAM_MPI=$expected' setting by 'FOAM_MPI=$optMpi'" - - replace etc/bashrc WM_MPLIB OPENMPI - adjusted=true - shift - ;; - - -openmpi-system) - # Explicitly set WM_MPLIB=SYSTEMOPENMPI - replace etc/bashrc WM_MPLIB SYSTEMOPENMPI - optMpi=system - adjusted=true - ;; - - -openmpi-third) - # Explicitly set WM_MPLIB=OPENMPI, using default setting for openmpi - replace etc/bashrc WM_MPLIB OPENMPI - optMpi=third - adjusted=true - ;; - - -paraview | -paraviewVersion | --paraviewVersion) - # Replace ParaView_VERSION=... - expected="[5-9][.0-9]*" - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - _matches "$2" "$expected" || die "'$1' option has bad value: '$2'" - - replace etc/config.sh/paraview ParaView_VERSION "$2" - adjusted=true - shift - ;; - - -paraview-path | -paraviewInstall | --paraviewInstall) - # Replace ParaView_DIR=... - [ "$#" -ge 2 ] || die "'$1' option requires an argument" - replace etc/config.sh/paraview ParaView_DIR "$2" - adjusted=true - shift - ;; - -kahip) # Replace KAHIP_VERSION=... [ "$#" -ge 2 ] || die "'$1' option requires an argument" @@ -448,6 +480,28 @@ do shift ;; + +## Graphics ## + + -paraview | -paraviewVersion | --paraviewVersion) + # Replace ParaView_VERSION=... + expected="[5-9][.0-9]*" + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + _matches "$2" "$expected" || die "'$1' option has bad value: '$2'" + + replace etc/config.sh/paraview ParaView_VERSION "$2" + adjusted=true + shift + ;; + + -paraview-path | -paraviewInstall | --paraviewInstall) + # Replace ParaView_DIR=... + [ "$#" -ge 2 ] || die "'$1' option requires an argument" + replace etc/config.sh/paraview ParaView_DIR "$2" + adjusted=true + shift + ;; + -vtk) # Replace vtk_version=... [ "$#" -ge 2 ] || die "'$1' option requires an argument" @@ -464,23 +518,8 @@ do shift ;; - gmp-[4-9]* | gmp-system) - # gcc-related package - replace etc/config.sh/compiler gmp_version "$1" - adjusted=true - ;; - mpfr-[2-9]* | mpfr-system) - # gcc-related package - replace etc/config.sh/compiler mpfr_version "$1" - adjusted=true - ;; - - mpc-[0-9]* | mpc-system) - # gcc-related package - replace etc/config.sh/compiler mpc_version "$1" - adjusted=true - ;; +## Misc ## -sigfpe | -no-sigfpe) echo "Enable/disable FOAM_SIGFPE now via controlDict" 1>&2 diff --git a/etc/config.csh/settings b/etc/config.csh/settings index 85bbff458d..60359e3b23 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -231,7 +231,7 @@ case Arm*: # Arm system compilers endsw # Clear prior to sourcing -unset gcc_version gmp_version mpfr_version mpc_version +unset gcc_version gmp_version mpfr_version mpc_version clang_version unsetenv GMP_ARCH_PATH MPFR_ARCH_PATH # Load pre-defined compiler versions diff --git a/etc/config.sh/settings b/etc/config.sh/settings index c03bcdb230..c8aafccdb2 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -228,7 +228,7 @@ Arm*) # Arm system compilers esac # Clear prior to sourcing -unset gcc_version gmp_version mpfr_version mpc_version +unset gcc_version gmp_version mpfr_version mpc_version clang_version unset GMP_ARCH_PATH MPFR_ARCH_PATH # Load pre-defined compiler versions