Commit 475220cf authored by Mark Olesen's avatar Mark Olesen

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.
parent de7ac041
...@@ -118,18 +118,24 @@ requireWMakeToolchain() ...@@ -118,18 +118,24 @@ requireWMakeToolchain()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Some functions as per OpenFOAM etc/config.sh/functions # Some functions as per OpenFOAM etc/config.sh/functions
unset -f _foamAddLib _foamAddMan _foamAddPath # Get settings only unset -f _foamAddLib _foamAddLibAuto _foamAddMan _foamAddPath # Get settings only
unset -f _foamEtc 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 # Source an etc file
_foamEtc() _foamEtc() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh $@)"; }
{
local file
if [ $# -gt 0 ] && file=$($WM_PROJECT_DIR/bin/foamEtcFile "$@")
then
. $file
fi
}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
......
...@@ -37,7 +37,15 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || { ...@@ -37,7 +37,15 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
unset ParaView_VERSION # Purge current values unset ParaView_VERSION # Purge current values
# ParaView_VERSION from etc/config.sh file: # 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 ParaView_VERSION="${ParaView_VERSION##*-}" # Without prefix
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment