From 54efaa445abeba6650111d2726035317986bda93 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 11 Jun 2018 10:19:18 +0200 Subject: [PATCH] STYLE: additional comments about suffixes - strip both prefix and suffix for VTK and ParaView builds --- makeParaView | 8 +++++++- makeParaView.example | 7 ++++++- makeVTK | 10 +++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/makeParaView b/makeParaView index fdec7db..e6f2dd6 100755 --- a/makeParaView +++ b/makeParaView @@ -47,7 +47,13 @@ then fi unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH -ParaView_VERSION="${ParaView_VERSION##*-}" # Without prefix +case "$ParaView_VERSION" in +[Pp]*) + ParaView_VERSION="${ParaView_VERSION##*-}" # Without "ParaView-" prefix + ;; +esac +ParaView_VERSION="${ParaView_VERSION%%-*}" # Without suffix (eg, -python) + # Set initial ParaView_MAJOR based on current value of ParaView_VERSION setParaViewVersion ${ParaView_VERSION:-none} diff --git a/makeParaView.example b/makeParaView.example index fd7dcee..61b141b 100755 --- a/makeParaView.example +++ b/makeParaView.example @@ -2,6 +2,10 @@ # An example for building particular combinations of ParaView with # - mpi (0 = no upper-limit on processes) # - mesa +# - python (required for Catalyst) +# +# NOTE: must modify etc/config.*/paraview to use this particular version +# and combination, or use chaining as per etc/config.*/example/paraview # mesa=mesa-11.2.2 # mesa=mesa-13.0.3 @@ -11,7 +15,8 @@ set -x ./makeParaView \ -mpi=0 \ -mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \ - -suffix mesa \ + -python \ + -suffix mesa-mpi-py \ "$@" #------------------------------------------------------------------------------ diff --git a/makeVTK b/makeVTK index 69e789f..d19a7a5 100755 --- a/makeVTK +++ b/makeVTK @@ -42,7 +42,15 @@ unset vtk_version mesa_version # Purge current values # vtk version from OpenFOAM etc/config.sh file: _foamEtc -config vtk -VTK_VERSION="${vtk_version##*-}" # Without prefix +VTK_VERSION="$vtk_version" + +case "$VTK_VERSION" in +[Vv]*) + VTK_VERSION="${VTK_VERSION##*-}" # Without "VTK-" prefix + ;; +esac +VTK_VERSION="${VTK_VERSION%%-*}" # Without suffix (eg, -mesa) + # New rendering backend (starting with vtk 7?). withGL2=auto # auto-config based on version