ENH: makeParaView now accepts paraview-VERSION directly as argument

- Symmetrical with the usage for most other ThirdParty build
  scripts. For example,

      "makeParaView ParaView-5.0.1"

- As a convenience, also allow a number directly. For example,

      "makeParaView 5.0.1"

  This should be clearer than the old instruction and does not
  rely on an alias:

      "foamPV 5.0.1; ./makeParaView"

BUG: heuristics for activating GL2 rendering backend missed when
     paraview version was specified from the command-line
This commit is contained in:
mark
2016-07-13 08:40:24 +02:00
parent 34023f31b8
commit bee5ef0d19
4 changed files with 71 additions and 30 deletions

View File

@ -72,12 +72,16 @@ setDirs()
#
# Set ParaView_VERSION and adjust ParaView_MAJOR accordingly
#
# $1 can contain something something like 4.4.0, paraview-4.4.0, ParaView-4.0.0
#
setVersion()
{
if [ "$#" -ge 1 ]
then
ParaView_VERSION="${1##paraview-}"
fi
[ $# -gt 0 ] || {
echo "Error: function setVersion() called without an argument"
exit 1
}
ParaView_VERSION="${1##*-}"
# The major version is "<digits>.<digits>"
ParaView_MAJOR=$(echo $ParaView_VERSION | \