#!/bin/sh cd ${0%/*} || exit 1 # Run from this directory # Optional unit: continue-on-error export WM_CONTINUE_ON_ERROR=true # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # # There are several prerequisites for building a plugin # #set -x canBuildPlugin() { [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || { echo echo "WARNING: cannot build ParaView plugin(s) without paraview directory" echo " ParaView_DIR=$ParaView_DIR" echo return 1 } [ -n "$PV_PLUGIN_PATH" ] || { echo echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)" echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}" echo return 1 } type cmake > /dev/null 2>&1 || { echo echo "WARNING: cannot build ParaView plugin(s) without cmake" echo return 1 } return 0 # success } # ----------------------------------------------------------------------------- case "$ParaView_VERSION" in 3*) 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" fi ;; *) echo echo "NOTE: skipping build of ParaView V3 plugin(s)" echo " different version: ParaView_VERSION=$ParaView_VERSION" echo ;; esac #------------------------------------------------------------------------------