mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
COMP: unset ParaView_DIR from PATH, LD_LIBRARY_PATH when building
- potential symbol conflicts and build errors if building from the git version since it uses the last major number (eg, 5.4) but may have a layout similar to the next release (eg, 5.5) and thus different sizes for classes etc.
This commit is contained in:
@ -118,18 +118,24 @@ requireWMakeToolchain()
|
||||
#------------------------------------------------------------------------------
|
||||
# Some functions as per OpenFOAM etc/config.sh/functions
|
||||
|
||||
unset -f _foamAddLib _foamAddMan _foamAddPath # Get settings only
|
||||
unset -f _foamEtc
|
||||
unset -f _foamAddLib _foamAddLibAuto _foamAddMan _foamAddPath # Get settings only
|
||||
unset -f _foamClean _foamEtc
|
||||
|
||||
if [ -x "$WM_PROJECT_DIR/bin/foamCleanPath" ]
|
||||
then
|
||||
# Cleaning environment variables
|
||||
_foamClean()
|
||||
{
|
||||
local var=$1
|
||||
shift
|
||||
eval $($WM_PROJECT_DIR/bin/foamCleanPath -sh-env=$var "$@")
|
||||
}
|
||||
else
|
||||
_foamClean() { echo "No foamCleanPath" 1>&2; }
|
||||
fi
|
||||
|
||||
# Source an etc file
|
||||
_foamEtc()
|
||||
{
|
||||
local file
|
||||
if [ $# -gt 0 ] && file=$($WM_PROJECT_DIR/bin/foamEtcFile "$@")
|
||||
then
|
||||
. $file
|
||||
fi
|
||||
}
|
||||
_foamEtc() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh $@)"; }
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
10
makeParaView
10
makeParaView
@ -37,7 +37,15 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
unset ParaView_VERSION # Purge current values
|
||||
|
||||
# ParaView_VERSION from etc/config.sh file:
|
||||
_foamEtc config.sh/paraview
|
||||
_foamEtc -config paraview
|
||||
|
||||
# Avoid any potential conflicts (especially if building from git)
|
||||
if [ -d "$ParaView_DIR" ]
|
||||
then
|
||||
_foamClean PATH "$ParaView_DIR"
|
||||
_foamClean LD_LIBRARY_PATH "$ParaView_DIR"
|
||||
fi
|
||||
unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH
|
||||
|
||||
ParaView_VERSION="${ParaView_VERSION##*-}" # Without prefix
|
||||
|
||||
|
||||
Reference in New Issue
Block a user