diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake index 3b7a2e37ef..883ad4f135 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -41,31 +41,25 @@ canBuildPlugin() # ----------------------------------------------------------------------------- +# major version as per paraview include directory: +# Eg, "PREFIX/include/paraview-3.4" -> "3.4" +major="${ParaView_INCLUDE_DIR##*-}" -case "$ParaView_VERSION" in -3*) +case "$major" in +3.[0-9]*) if canBuildPlugin then - [ -n "$PV_PLUGIN_PATH" ] || { - echo "$0 : PV_PLUGIN_PATH not valid - it is unset" - exit 1 - } - - # Ensure CMake gets the correct C/C++ compilers - [ -n "$WM_CC" ] && export CC="$WM_CC" - [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - + ( wmake $targetType vtkPV3Readers - PV3blockMeshReader/Allwmake $targetType $* - PV3FoamReader/Allwmake $targetType $* - else - echo "ERROR: ParaView not found in $ParaView_DIR" + PV3blockMeshReader/Allwmake $* + PV3FoamReader/Allwmake $* + ) fi ;; *) echo echo "NOTE: skipping build of ParaView V3 plugin(s)" - echo " different version: ParaView_VERSION=$ParaView_VERSION" + echo " include directory was for paraview major version '${major:-none}'" echo ;; esac diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake index 92fd94701d..ebe8498e5d 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake @@ -42,37 +42,31 @@ canBuildPlugin() # ----------------------------------------------------------------------------- -case "$ParaView_VERSION" in -4* | 5*) +# major version as per paraview include directory: +# Eg, "PREFIX/include/paraview-5.0" -> "5.0" +major="${ParaView_INCLUDE_DIR##*-}" + +case "$major" in +[45].[0-9]*) if canBuildPlugin then - [ -n "$PV_PLUGIN_PATH" ] || { - echo "$0 : PV_PLUGIN_PATH not valid - it is unset" - exit 1 - } - - # ensure CMake gets the correct C/C++ compilers - [ -n "$WM_CC" ] && export CC="$WM_CC" - [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - + ( wmake $targetType vtkPVReaders - PVblockMeshReader/Allwmake $targetType $* - PVFoamReader/Allwmake $targetType $* + PVblockMeshReader/Allwmake $* + PVFoamReader/Allwmake $* # Dummy directory to trigger proper 'wclean all' behaviour # - the Allwclean will otherwise not be used mkdir -p Make - else - echo "ERROR: ParaView not found in $ParaView_DIR" + ) fi ;; *) echo echo "NOTE: skipping build of ParaView plugin(s)" - echo " different version: ParaView_VERSION=$ParaView_VERSION" + echo " include directory was for paraview major version '${major:-none}'" echo ;; esac - #------------------------------------------------------------------------------