ENH: use new foamEtcFile options to simplify syntax when sourcing files

Can now use this:
    _foamSourceEtc config.sh/scotch
    _foamSourceEtc config.csh/scotch

instead of this:
    _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/scotch`

In the bash/sh version, leave the _foamSource function for now, since
ThirdParty is still relying on it.

STYLE: elminate while-loop for _foamAddPath etc since this type of
construct isn't readily possible for csh and isn't being used anywhere.
This commit is contained in:
Mark Olesen
2017-02-23 15:55:38 +01:00
parent c9e4fd77fd
commit c84b9aaac6
7 changed files with 70 additions and 63 deletions

View File

@ -53,7 +53,7 @@ case SYSTEMOPENMPI:
case OPENMPI:
setenv FOAM_MPI openmpi-1.10.4
# Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/openmpi`
_foamSourceEtc config.csh/openmpi
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI

View File

@ -212,7 +212,7 @@ if ( ! $?WM_COMPILER_TYPE ) setenv WM_COMPILER_TYPE system
# Load configured compiler versions, regardless of the compiler type
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
_foamSourceEtc config.csh/compiler
switch ("$WM_COMPILER_TYPE")
case system: