BUG: _foamAddPath not available when foamPV alias/function is used
STYLE: only use paraview settings when actually available - this means executing makeParaView prior to building OpenFOAM itself, but is consistent with the instructions given by makeParaView, and elminates anticipating the source location from the paraview config file, which increases the build flexibilty for ThirdParty
This commit is contained in:
parent
21251970ac
commit
dec8bd46c3
@ -35,7 +35,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Use other (shipped) paraview.csh with a different ParaView_VERSION
|
||||
# Use other (shipped) paraview with a different ParaView_VERSION
|
||||
#
|
||||
|
||||
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview`
|
||||
|
@ -60,6 +60,12 @@ case OPENMPI:
|
||||
# Tell OpenMPI where to find its install directory
|
||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "Using OPENMPI:"
|
||||
echo " OPAL_PREFIX : $OPAL_PREFIX"
|
||||
echo " FOAM_MPI : $FOAM_MPI"
|
||||
endif
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
|
@ -66,7 +66,8 @@ if ( $status == 0 ) setenv PATH $cleaned
|
||||
# ThirdParty cmake
|
||||
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
|
||||
if ( -r $cmake/bin/cmake ) then
|
||||
_foamAddPath $cmake/bin
|
||||
# _foamAddPath not available when foamPV alias is used
|
||||
setenv PATH $cmake/bin:${PATH}
|
||||
endif
|
||||
|
||||
# Evaluate command-line parameters for ParaView
|
||||
@ -101,12 +102,11 @@ if ( $?ParaView_VERSION ) then
|
||||
|
||||
set pvName=ParaView-$ParaView_VERSION
|
||||
set pvMajor=paraview-$ParaView_MAJOR
|
||||
set pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName
|
||||
|
||||
setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName
|
||||
|
||||
# Set paths if binaries or source are present
|
||||
if ( -r $ParaView_DIR || -r $pvSrcDir ) then
|
||||
# Set paths if binaries are present
|
||||
if ( -r $ParaView_DIR ) then
|
||||
set pvLibDir=${ParaView_DIR}/lib/$pvMajor
|
||||
set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||
|
||||
@ -132,13 +132,18 @@ if ( $?ParaView_VERSION ) then
|
||||
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH"
|
||||
endif
|
||||
else
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
echo "No paraview found"
|
||||
echo " ParaView_DIR : $ParaView_DIR"
|
||||
endif
|
||||
|
||||
unsetenv ParaView_INCLUDE_DIR PV_PLUGIN_PATH
|
||||
setenv ParaView_DIR # Defined but empty (used by foamPV alias)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython
|
||||
unsetenv ParaView_VERSION ParaView_MAJOR
|
||||
unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython
|
||||
unsetenv ParaView_MAJOR ParaView_VERSION
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -63,6 +63,13 @@ OPENMPI)
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "Using OPENMPI:" 1>&2
|
||||
echo " OPAL_PREFIX : $OPAL_PREFIX" 1>&2
|
||||
echo " FOAM_MPI : $FOAM_MPI" 1>&2
|
||||
fi
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
|
@ -49,6 +49,9 @@
|
||||
# export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-5.2:$LD_LIBRARY_PATH
|
||||
# unset ParaView_VERSION # avoid using ThirdParty settings
|
||||
#
|
||||
# Note
|
||||
# When _foamAddLib is unset (eg, called from makeParaView or from foamPV):
|
||||
# - the ParaView_VERSION variable is retained.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ParaView_VERSION=5.2.0
|
||||
@ -70,7 +73,8 @@ cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
|
||||
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
|
||||
if [ -r $cmake/bin/cmake ]
|
||||
then
|
||||
_foamAddPath $cmake/bin
|
||||
# _foamAddPath not available when foamPV function is used
|
||||
PATH=$cmake/bin:$PATH
|
||||
fi
|
||||
|
||||
# Evaluate command-line parameters for ParaView
|
||||
@ -112,12 +116,11 @@ then
|
||||
|
||||
pvName=ParaView-$ParaView_VERSION
|
||||
pvMajor=paraview-$ParaView_MAJOR
|
||||
pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName
|
||||
|
||||
export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName
|
||||
|
||||
# Set paths if binaries or source are present
|
||||
if [ -r $ParaView_DIR -o -r $pvSrcDir ]
|
||||
if [ -r $ParaView_DIR ]
|
||||
then
|
||||
pvLibDir=$ParaView_DIR/lib/$pvMajor
|
||||
pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||
@ -147,13 +150,24 @@ then
|
||||
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH"
|
||||
fi
|
||||
else
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||
then
|
||||
echo "No paraview found"
|
||||
echo " ParaView_DIR : $ParaView_DIR"
|
||||
fi
|
||||
|
||||
unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
unset -f _foamParaviewEval
|
||||
unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython
|
||||
unset ParaView_VERSION ParaView_MAJOR
|
||||
unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython
|
||||
unset ParaView_MAJOR
|
||||
|
||||
if type _foamAddLib > /dev/null 2>&1 # normal sourcing
|
||||
then
|
||||
unset ParaView_VERSION
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user