mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: change ParaView_MAJOR to only contain version information without
leading text
* Something like ParaView_MAJOR=ParaView_3.6 would have previously
been possible, but this violates paraview's expectation of having
"lib/paraview-<digits>.<digits>"
* TODO? If desired, the ParaView_MAJOR could be determined
automatically in the script.
For example,
ParaView_MAJOR=`echo $ParaView_VERSION | \
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
Or even,
ParaView_MAJOR=${ParaView_VERSION%.[0-9]}
Except that the second version fails if the minor version reaches
double digits.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -46,9 +46,12 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# set MAJOR and VERSION variables if not already set
|
||||
[ -z "$ParaView_MAJOR" ] && export ParaView_MAJOR=paraview-3.6
|
||||
|
||||
# set VERSION and MAJOR (version) variables if not already set
|
||||
# the major version is "<digits>.<digits>"
|
||||
[ -z "$ParaView_VERSION" ] && export ParaView_VERSION=3.6.1
|
||||
[ -z "$ParaView_MAJOR" ] && export ParaView_MAJOR=3.6
|
||||
|
||||
|
||||
export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION
|
||||
export ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER
|
||||
@ -59,9 +62,9 @@ if [ -r $ParaView_PYTHON_DIR ]
|
||||
then
|
||||
if [ "$PYTHONPATH" ]
|
||||
then
|
||||
export PYTHONPATH=$PYTHONPATH:$ParaView_PYTHON_DIR:$ParaView_DIR/lib/$ParaView_MAJOR
|
||||
export PYTHONPATH=$PYTHONPATH:$ParaView_PYTHON_DIR:$ParaView_DIR/lib/paraview-$ParaView_MAJOR
|
||||
else
|
||||
export PYTHONPATH=$ParaView_PYTHON_DIR:$ParaView_DIR/lib/$ParaView_MAJOR
|
||||
export PYTHONPATH=$ParaView_PYTHON_DIR:$ParaView_DIR/lib/paraview-$ParaView_MAJOR
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -44,8 +44,10 @@ foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 )
|
||||
endif
|
||||
end
|
||||
|
||||
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR paraview-3.6
|
||||
# set VERSION and MAJOR (version) variables if not already set
|
||||
# the major version is "<digits>.<digits>"
|
||||
if ( ! $?ParaView_VERSION ) setenv ParaView_VERSION 3.6.1
|
||||
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR 3.6
|
||||
|
||||
setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION
|
||||
setenv ParaView_DIR $ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER
|
||||
@ -54,9 +56,9 @@ setenv ParaView_DIR $ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER
|
||||
set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||
if ( -r $paraviewPython ) then
|
||||
if ($?PYTHONPATH) then
|
||||
setenv PYTHONPATH ${PYTHONPATH}:${paraviewPython}:$ParaView_DIR/lib/${ParaView_MAJOR}
|
||||
setenv PYTHONPATH ${PYTHONPATH}:${paraviewPython}:$ParaView_DIR/lib/paraview-${ParaView_MAJOR}
|
||||
else
|
||||
setenv PYTHONPATH ${paraviewPython}:$ParaView_DIR/lib/${ParaView_MAJOR}
|
||||
setenv PYTHONPATH ${paraviewPython}:$ParaView_DIR/lib/paraview-${ParaView_MAJOR}
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user