mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: remove reliance on ParaView_VERSION env variable
- as per the other build scripts, use the OpenFOAM config files for the base settings and command-line arguments for refinement. Note that the $ParaView_DIR (the installation path) contains the paraview version information. So there is no need to keep a second variable just for that purpose.
This commit is contained in:
12
makeParaView
12
makeParaView
@ -30,6 +30,15 @@
|
|||||||
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
||||||
# (note capitalisation)
|
# (note capitalisation)
|
||||||
#
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Get ParaView_DIR location from OpenFOAM config file
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
||||||
|
|
||||||
|
# Determine ParaView_VERSION from ParaView_DIR location:
|
||||||
|
ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION
|
||||||
|
: ${ParaView_VERSION##*-}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd ${0%/*} || exit 1
|
||||||
@ -82,6 +91,7 @@ withGL2=auto
|
|||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
@ -133,6 +143,8 @@ For example,
|
|||||||
|
|
||||||
./makeParaview 4.4.0
|
./makeParaview 4.4.0
|
||||||
|
|
||||||
|
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,15 @@
|
|||||||
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
||||||
# (note capitalisation)
|
# (note capitalisation)
|
||||||
#
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Get ParaView_DIR location from OpenFOAM config file
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
||||||
|
|
||||||
|
# Determine ParaView_VERSION from ParaView_DIR location:
|
||||||
|
ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION
|
||||||
|
: ${ParaView_VERSION##*-}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd ${0%/*} || exit 1
|
||||||
@ -78,6 +87,7 @@ CMAKE_PATH=""
|
|||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
@ -126,6 +136,8 @@ For example,
|
|||||||
|
|
||||||
./makeParaview 3.14.1
|
./makeParaview 3.14.1
|
||||||
|
|
||||||
|
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user