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:
mark
2016-07-13 09:36:06 +02:00
parent bee5ef0d19
commit f3ef77b946
2 changed files with 24 additions and 0 deletions

View File

@ -30,6 +30,15 @@
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
# (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
cd ${0%/*} || exit 1
@ -82,6 +91,7 @@ withGL2=auto
Script=${0##*/}
usage() {
: ${ParaView_VERSION:=none} # some dummy value for usage information
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
@ -133,6 +143,8 @@ For example,
./makeParaview 4.4.0
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
USAGE
exit 1
}

View File

@ -30,6 +30,15 @@
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
# (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
cd ${0%/*} || exit 1
@ -78,6 +87,7 @@ CMAKE_PATH=""
Script=${0##*/}
usage() {
: ${ParaView_VERSION:=none} # some dummy value for usage information
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
@ -126,6 +136,8 @@ For example,
./makeParaview 3.14.1
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
USAGE
exit 1
}