CONFIG: accept module-prefix 'none' as equivalent to 'false' (ie, disabled)

This commit is contained in:
Mark Olesen
2021-05-31 10:52:17 +02:00
parent 0ba43df9c5
commit e681c127f2
4 changed files with 14 additions and 8 deletions

View File

@ -73,10 +73,10 @@ echo
applications/Allwmake $targetType $* applications/Allwmake $targetType $*
# Additional components/modules # Additional components/modules
if [ "$FOAM_MODULE_PREFIX" = false ] if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
then then
echo "========================================" echo "========================================"
echo "OpenFOAM modules disabled (prefix=false)" echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo echo
elif [ -d "$WM_PROJECT_DIR/modules" ] elif [ -d "$WM_PROJECT_DIR/modules" ]
then then

View File

@ -12,7 +12,13 @@ targetType=libso
export FOAM_MODULE_PREFIX export FOAM_MODULE_PREFIX
echo "========================================" echo "========================================"
echo "Compile OpenFOAM modules" if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
then
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo
exit 0
fi
echo "prefix = $FOAM_MODULE_PREFIX" echo "prefix = $FOAM_MODULE_PREFIX"
echo echo
echo " ignoring possible compilation errors" echo " ignoring possible compilation errors"

View File

@ -120,8 +120,8 @@ do
# Prefix: openfoam (other) # Prefix: openfoam (other)
(o | openfoam) FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}" ;; (o | openfoam) FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}" ;;
# Prefix: false (ie, 'disabled') # Prefix: false | none (ie, 'disabled')
(false) FOAM_MODULE_PREFIX=false ;; (false | none) FOAM_MODULE_PREFIX=false ;;
# Prefix: directory (absolute or relative) # Prefix: directory (absolute or relative)
(*) (*)

View File

@ -6,7 +6,7 @@
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2015-2016 OpenFOAM Foundation # Copyright (C) 2015-2016 OpenFOAM Foundation
# Copyright (C) 2018-2020 OpenCFD Ltd. # Copyright (C) 2018-2021 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -71,8 +71,8 @@ setModulePrefix()
# Prefix: openfoam (other) # Prefix: openfoam (other)
(o | openfoam) FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}" ;; (o | openfoam) FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}" ;;
# Prefix: false (ie, 'disabled') # Prefix: false | none (ie, 'disabled')
(false) FOAM_MODULE_PREFIX=false ;; (false | none) FOAM_MODULE_PREFIX=false ;;
# Prefix: directory (absolute or relative) # Prefix: directory (absolute or relative)
(*) (*)