CONFIG: improve handling of empty/non-empty ThirdParty directory
This commit is contained in:
parent
a7e464a70a
commit
4dda01f161
@ -6,7 +6,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -174,12 +174,13 @@ _foamAddPath "${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}"
|
||||
# Dummy versions of external libraries. To be found last in library path
|
||||
_foamAddLib "$FOAM_LIBBIN/dummy"
|
||||
|
||||
# External (ThirdParty) libraries. Also allowed to be unset
|
||||
if ( -d "$WM_THIRD_PARTY_DIR" ) then
|
||||
# External (ThirdParty) libraries:
|
||||
# - check if already compiled, or will be compiled.
|
||||
# can also be unset
|
||||
unsetenv FOAM_EXT_LIBBIN
|
||||
if ( -d "$WM_THIRD_PARTY_DIR/platforms" || -f "$WM_THIRD_PARTY_DIR/Allwmake" ) then
|
||||
setenv FOAM_EXT_LIBBIN "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib"
|
||||
_foamAddLib "$FOAM_EXT_LIBBIN"
|
||||
else
|
||||
unsetenv FOAM_EXT_LIBBIN
|
||||
endif
|
||||
|
||||
# OpenFOAM libraries (user, group, standard)
|
||||
|
@ -6,7 +6,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -174,13 +174,14 @@ _foamAddPath "$FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN"
|
||||
# Dummy versions of external libraries. To be found last in library path
|
||||
_foamAddLib "$FOAM_LIBBIN/dummy"
|
||||
|
||||
# External (ThirdParty) libraries. Also allowed to be unset
|
||||
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
||||
# External (ThirdParty) libraries:
|
||||
# - check if already compiled, or will be compiled.
|
||||
# can also be unset
|
||||
unset FOAM_EXT_LIBBIN
|
||||
if [ -d "$WM_THIRD_PARTY_DIR/platforms" ] || [ -f "$WM_THIRD_PARTY_DIR/Allwmake" ]
|
||||
then
|
||||
export FOAM_EXT_LIBBIN="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib"
|
||||
_foamAddLib "$FOAM_EXT_LIBBIN"
|
||||
else
|
||||
unset FOAM_EXT_LIBBIN
|
||||
fi
|
||||
|
||||
# OpenFOAM libraries (user, group, standard)
|
||||
|
Loading…
Reference in New Issue
Block a user