From 4f22868d76514330517af11a7c8ffef8f5dad98a Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Thu, 11 Apr 2013 09:52:45 +0100
Subject: [PATCH] ENH: Cleaned-up build of multiple PV readers

---
 .../graphics/PV398Readers/Allwmake            | 29 +++++++++++--------
 .../graphics/PV3Readers/Allwmake              | 29 +++++++++++--------
 2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake
index 33d6bd18dd8..1469999cb6f 100755
--- a/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake
@@ -2,21 +2,26 @@
 cd ${0%/*} || exit 1    # run from this directory
 #set -x
 
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
-then
-    [ -n "$PV_PLUGIN_PATH" ] || {
-        echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
-        exit 1
-    }
+if [ "$ParaView_VERSION" == "3.98.1" ]
+    then
+    if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+    then
+        [ -n "$PV_PLUGIN_PATH" ] || {
+            echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
+            exit 1
+        }
 
-    # ensure CMake gets the correct C++ compiler
-    [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
+        # ensure CMake gets the correct C++ compiler
+        [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
 
-    wmake libso vtkPV398Readers
-    PV398blockMeshReader/Allwmake
-    PV398FoamReader/Allwmake
+        wmake libso vtkPV398Readers
+        PV398blockMeshReader/Allwmake
+        PV398FoamReader/Allwmake
+    else
+        echo "ERROR: ParaView not found in $ParaView_DIR"
+    fi
 else
-    echo "ERROR: ParaView not found in $ParaView_DIR"
+    echo "WARN: PV398 readers not building: ParaView_VERSION=$ParaView_VERSION"
 fi
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
index 1568f8afb80..03b352116e7 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
@@ -2,21 +2,26 @@
 cd ${0%/*} || exit 1    # run from this directory
 #set -x
 
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
-then
-    [ -n "$PV_PLUGIN_PATH" ] || {
-        echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
-        exit 1
-    }
+if [ "$ParaView_VERSION" != "3.98.1" ]
+    then
+    if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+    then
+        [ -n "$PV_PLUGIN_PATH" ] || {
+            echo "$0 : PV_PLUGIN_PATH not valid - it is unset"
+            exit 1
+        }
 
-    # ensure CMake gets the correct C++ compiler
-    [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
+        # ensure CMake gets the correct C++ compiler
+        [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
 
-    wmake libso vtkPV3Readers
-    PV3blockMeshReader/Allwmake
-    PV3FoamReader/Allwmake
+        wmake libso vtkPV3Readers
+        PV3blockMeshReader/Allwmake
+        PV3FoamReader/Allwmake
+    else
+        echo "ERROR: ParaView not found in $ParaView_DIR"
+    fi
 else
-    echo "ERROR: ParaView not found in $ParaView_DIR"
+    echo "WARN: PV3 readers not building: ParaView_VERSION=$ParaView_VERSION"
 fi
 
 # ----------------------------------------------------------------- end-of-file
-- 
GitLab