mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: simplify paraview lib path for 5.5 (issue #793)
- note that the python paths also seem to be treated differently
This commit is contained in:
@ -13,17 +13,19 @@
|
|||||||
# config.csh/example/paraview
|
# config.csh/example/paraview
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Example of chaining to the standard config.csh/paraview with a
|
# Example of defining a different ParaView_VERSION but retaining
|
||||||
# different ParaView_VERSION
|
# the standard config.csh/paraview mechanism
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# This file could be copied to a user or site location, but should never
|
# This file could be copied to a user or site location, but should never
|
||||||
# replace the default shipped version as this will cause an infinite loop
|
# replace the default shipped version as this will cause an infinite loop
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Use standard paraview config file (-mode=o) with a different ParaView_VERSION
|
# Use standard paraview config file (-mode=o) with a different ParaView_VERSION
|
||||||
|
|
||||||
eval `foamEtcFile -csh -config -mode=o paraview -- ParaView_VERSION=5.5.0-mpipy`
|
set pv=5.5.0
|
||||||
|
set pv=5.5.0-mpipy
|
||||||
|
|
||||||
|
eval `foamEtcFile -csh -config -mode=o paraview -- ParaView_VERSION=$pv`
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -50,7 +50,7 @@ set cmake_version=cmake-system
|
|||||||
|
|
||||||
# END OF (NORMAL) USER EDITABLE PART
|
# END OF (NORMAL) USER EDITABLE PART
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
set pv_api=auto # Normally auto or pair of digits (eg, '5.4' etc)
|
set pv_api=auto # Either auto or pair of digits (eg, '5.4' etc)
|
||||||
|
|
||||||
if (! $?ParaView_DIR ) setenv ParaView_DIR
|
if (! $?ParaView_DIR ) setenv ParaView_DIR
|
||||||
if (! $?WM_COMPILER_LIB_ARCH ) setenv WM_COMPILER_LIB_ARCH
|
if (! $?WM_COMPILER_LIB_ARCH ) setenv WM_COMPILER_LIB_ARCH
|
||||||
@ -101,18 +101,26 @@ if ( $?ParaView_VERSION ) then
|
|||||||
endsw
|
endsw
|
||||||
|
|
||||||
setenv ParaView_DIR $archDir/ParaView-$ParaView_VERSION
|
setenv ParaView_DIR $archDir/ParaView-$ParaView_VERSION
|
||||||
set pvSubDir=paraview-$pv_api
|
|
||||||
|
|
||||||
# Set paths if binaries are present
|
# Set paths if binaries are present
|
||||||
if ( -r $ParaView_DIR ) then
|
if ( -r $ParaView_DIR ) then
|
||||||
set pvLibDir=${ParaView_DIR}/lib/$pvSubDir
|
|
||||||
set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
|
||||||
|
|
||||||
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
||||||
setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/$pvSubDir
|
setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-$pv_api
|
||||||
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/$pvSubDir
|
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-$pv_api
|
||||||
|
|
||||||
# Add in qt libraries as required
|
set pvLibDir=${ParaView_DIR}/lib/paraview-$pv_api
|
||||||
|
#OBSOLETE? set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||||
|
|
||||||
|
#OBSOLETE? # Python libraries as required
|
||||||
|
#OBSOLETE? if ( -r $pvPython ) then
|
||||||
|
#OBSOLETE? if ($?PYTHONPATH) then
|
||||||
|
#OBSOLETE? setenv PYTHONPATH ${PYTHONPATH}:${pvPython}:$pvLibDir
|
||||||
|
#OBSOLETE? else
|
||||||
|
#OBSOLETE? setenv PYTHONPATH ${pvPython}:$pvLibDir
|
||||||
|
#OBSOLETE? endif
|
||||||
|
#OBSOLETE? endif
|
||||||
|
|
||||||
|
# QT libraries as required
|
||||||
set qtDir="$archDir/$ParaView_QT"
|
set qtDir="$archDir/$ParaView_QT"
|
||||||
if ( -d "$qtDir" ) then
|
if ( -d "$qtDir" ) then
|
||||||
foreach qtLibDir ("$qtDir/lib$WM_COMPILER_LIB_ARCH" "$qtDir/lib")
|
foreach qtLibDir ("$qtDir/lib$WM_COMPILER_LIB_ARCH" "$qtDir/lib")
|
||||||
@ -123,19 +131,17 @@ if ( $?ParaView_VERSION ) then
|
|||||||
end
|
end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Add in python libraries if required
|
# ParaView libraries
|
||||||
if ( -r $pvPython ) then
|
# - 5.4 and earlier: lib/paraview-X.X
|
||||||
if ($?PYTHONPATH) then
|
# - 5.5 and later: lib/
|
||||||
setenv PYTHONPATH ${PYTHONPATH}:${pvPython}:$pvLibDir
|
switch ("$pv_api")
|
||||||
else
|
case 5.[0-4]*:
|
||||||
setenv PYTHONPATH ${pvPython}:$pvLibDir
|
setenv LD_LIBRARY_PATH $pvLibDir:${LD_LIBRARY_PATH}
|
||||||
endif
|
breaksw
|
||||||
endif
|
default:
|
||||||
|
setenv LD_LIBRARY_PATH ${ParaView_DIR}/lib:${LD_LIBRARY_PATH}
|
||||||
# Prepend paraview libraries.
|
breaksw
|
||||||
# ParaView 5.4 and earlier - requires lib/paraview-X.X only
|
endsw
|
||||||
# ParaView 5.5 - requires lib/
|
|
||||||
setenv LD_LIBRARY_PATH "${ParaView_DIR}/lib:${pvLibDir}:${LD_LIBRARY_PATH}"
|
|
||||||
|
|
||||||
if ($?FOAM_VERBOSE && $?prompt) then
|
if ($?FOAM_VERBOSE && $?prompt) then
|
||||||
echo "Using paraview"
|
echo "Using paraview"
|
||||||
@ -158,7 +164,7 @@ endif
|
|||||||
|
|
||||||
unset cleaned archDir
|
unset cleaned archDir
|
||||||
unset cmake cmake_version
|
unset cmake cmake_version
|
||||||
unset pv_api pvSubDir pvLibDir pvPython qtDir qtLibDir
|
unset pv_api pvLibDir pvPython qtDir qtLibDir
|
||||||
unsetenv ParaView_VERSION ParaView_QT
|
unsetenv ParaView_VERSION ParaView_QT
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -13,17 +13,19 @@
|
|||||||
# config.sh/example/paraview
|
# config.sh/example/paraview
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Example of chaining to the standard config.sh/paraview with a
|
# Example of defining a different ParaView_VERSION but retaining
|
||||||
# different ParaView_VERSION
|
# the standard config.sh/paraview mechanism
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# This file could be copied to a user or site location, but should never
|
# This file could be copied to a user or site location, but should never
|
||||||
# replace the default shipped version as this will cause an infinite loop.
|
# replace the default shipped version as this will cause an infinite loop.
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Use standard paraview config file (-mode=o) with a different ParaView_VERSION
|
# Use standard paraview config file (-mode=o) with a different ParaView_VERSION
|
||||||
|
|
||||||
eval $(foamEtcFile -sh -config -mode=o paraview -- ParaView_VERSION=5.5.0-mpipy)
|
pv=5.5.0
|
||||||
|
pv=5.5.0-mpipy
|
||||||
|
|
||||||
|
eval $(foamEtcFile -sh -config -mode=o paraview -- ParaView_VERSION=$pv)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -53,7 +53,7 @@ cmake_version=cmake-system
|
|||||||
|
|
||||||
# END OF (NORMAL) USER EDITABLE PART
|
# END OF (NORMAL) USER EDITABLE PART
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
pv_api=auto # Normally auto or pair of digits (eg, '5.4' etc)
|
pv_api=auto # Either auto or pair of digits (eg, '5.4' etc)
|
||||||
|
|
||||||
# Compiler-specific location for ThirdParty installations
|
# Compiler-specific location for ThirdParty installations
|
||||||
archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER"
|
archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER"
|
||||||
@ -111,19 +111,24 @@ then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
export ParaView_DIR=$archDir/ParaView-$ParaView_VERSION
|
export ParaView_DIR=$archDir/ParaView-$ParaView_VERSION
|
||||||
pvSubDir=paraview-$pv_api
|
|
||||||
|
|
||||||
# Set paths if binaries are present
|
# Set paths if binaries are present
|
||||||
if [ -r $ParaView_DIR ]
|
if [ -r $ParaView_DIR ]
|
||||||
then
|
then
|
||||||
pvLibDir=$ParaView_DIR/lib/$pvSubDir
|
|
||||||
pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
|
||||||
|
|
||||||
export PATH=$ParaView_DIR/bin:$PATH
|
export PATH=$ParaView_DIR/bin:$PATH
|
||||||
export ParaView_INCLUDE_DIR=$ParaView_DIR/include/$pvSubDir
|
export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$pv_api
|
||||||
export PV_PLUGIN_PATH=$FOAM_LIBBIN/$pvSubDir
|
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$pv_api
|
||||||
|
|
||||||
# Add in qt libraries as required
|
pvLibDir=$ParaView_DIR/lib/paraview-$pv_api
|
||||||
|
#OBSOLETE? pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||||
|
|
||||||
|
#OBSOLETE? # Python libraries as required
|
||||||
|
#OBSOLETE? if [ -r $pvPython ]
|
||||||
|
#OBSOLETE? then
|
||||||
|
#OBSOLETE? export PYTHONPATH=$PYTHONPATH:${PYTHONPATH:+:}$pvPython:$pvLibDir
|
||||||
|
#OBSOLETE? fi
|
||||||
|
|
||||||
|
# QT libraries as required
|
||||||
qtDir="$archDir/$ParaView_QT"
|
qtDir="$archDir/$ParaView_QT"
|
||||||
if [ -d "$qtDir" ]
|
if [ -d "$qtDir" ]
|
||||||
then
|
then
|
||||||
@ -137,21 +142,17 @@ then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepend paraview libraries.
|
# ParaView libraries
|
||||||
# ParaView 5.4 and earlier - requires lib/paraview-X.X only
|
# - 5.4 and earlier: lib/paraview-X.X
|
||||||
# ParaView 5.5 - requires lib/
|
# - 5.5 and later: lib/
|
||||||
export LD_LIBRARY_PATH=$ParaView_DIR/lib:$pvLibDir:$LD_LIBRARY_PATH
|
case "$pv_api" in
|
||||||
|
5.[0-4]*)
|
||||||
# Add in python libraries if required
|
export LD_LIBRARY_PATH=$pvLibDir:$LD_LIBRARY_PATH
|
||||||
if [ -r $pvPython ]
|
;;
|
||||||
then
|
*)
|
||||||
if [ "$PYTHONPATH" ]
|
export LD_LIBRARY_PATH=$ParaView_DIR/lib:$LD_LIBRARY_PATH
|
||||||
then
|
;;
|
||||||
export PYTHONPATH=$PYTHONPATH:$pvPython:$pvLibDir
|
esac
|
||||||
else
|
|
||||||
export PYTHONPATH=$pvPython:$pvLibDir
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||||
then
|
then
|
||||||
@ -176,7 +177,7 @@ fi
|
|||||||
unset -f _foamParaviewEval 2> /dev/null
|
unset -f _foamParaviewEval 2> /dev/null
|
||||||
unset cleaned archDir
|
unset cleaned archDir
|
||||||
unset cmake cmake_version
|
unset cmake cmake_version
|
||||||
unset pv_api pvSubDir pvLibDir pvPython qtDir qtLibDir
|
unset pv_api pvLibDir pvPython qtDir qtLibDir
|
||||||
|
|
||||||
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
|
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user