mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: adjust handling of PETSc environment (-force option)
This commit is contained in:
@ -43,6 +43,16 @@ then
|
|||||||
|
|
||||||
unset petsc_version
|
unset petsc_version
|
||||||
|
|
||||||
|
elif [ "$1" = "-force" ]
|
||||||
|
then
|
||||||
|
# Forced command-line sourcing
|
||||||
|
|
||||||
|
if output="$($WM_PROJECT_DIR/bin/tools/lib-dir -sh $PETSC_ARCH_PATH 2>/dev/null)"
|
||||||
|
then
|
||||||
|
eval "$output"
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset petsc_version output
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -55,9 +55,17 @@ echo_petsc()
|
|||||||
have_petsc()
|
have_petsc()
|
||||||
{
|
{
|
||||||
local header library static label settings warn
|
local header library static label settings warn
|
||||||
# warn="==> skip petsc"
|
warn="==> skip petsc"
|
||||||
|
|
||||||
# Basic setup/checks
|
# Basic setup/checks. Prefer current environment value? (TDB)
|
||||||
|
if [ ! -d "$PETSC_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/petsc) || {
|
||||||
|
[ -n "$warn" ] && echo "$warn (no config.sh/petsc settings)"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
. $settings
|
||||||
|
fi
|
||||||
if isNone "$PETSC_ARCH_PATH"
|
if isNone "$PETSC_ARCH_PATH"
|
||||||
then
|
then
|
||||||
[ -n "$warn" ] && echo "$warn (not available)"
|
[ -n "$warn" ] && echo "$warn (not available)"
|
||||||
|
|||||||
Reference in New Issue
Block a user