Commit ba2c04d4 authored by mark's avatar mark
Browse files

ENH: also support compilation of ParaView-vX.Y.Z source directories (issue #10)

- The ParaView sources mostly unpack into ParaView-v5.2.0, so support
  this directly without forcing people to rename the directory first.
parent d23b9bf9
......@@ -41,11 +41,21 @@
#
setParaViewDirs()
{
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION"
unset ParaView_SOURCE_DIR
for i
do
ParaView_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i"
[ -d "$ParaView_SOURCE_DIR" ] && break
done
[ -d "$ParaView_SOURCE_DIR" ] || {
echo "did not find ParaView-$ParaView_VERSION in these directories:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo "Did not locate ParaView version:"
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo
echo "abort build"
exit 1
......
......@@ -42,11 +42,21 @@
#
setVtkDirs()
{
VTK_SOURCE_DIR=$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION"
unset VTK_SOURCE_DIR
for i
do
VTK_SOURCE_DIR="$WM_THIRD_PARTY_DIR/$i"
[ -d "$VTK_SOURCE_DIR" ] && break
done
[ -d "$VTK_SOURCE_DIR" ] || {
echo "did not find VTK-$VTK_VERSION in these directories:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo "Did not locate VTK version:"
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo
echo "abort build"
exit 1
......
......@@ -26,9 +26,12 @@
# makeParaView
#
# Description
# Make and install paraview 4 or 5
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
# (note capitalisation)
# Make and install ParaView 4 or 5.
# The ParaView sources should be located under one of these locations:
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
#
# Note the capitalization of ParaView in the directory names.
#
#------------------------------------------------------------------------------
# Get ParaView_DIR location from OpenFOAM config file
......
......@@ -26,16 +26,18 @@
# makeVTK
#
# Description
# Make and install VTK
# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION
# Make and install VTK.
# The VTK sources should be located under one of these locations:
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
#
# To use the VTK source from the ParaView source tree, simply make an
# appropriate link first. For example,
#
# ln -s ParaView-5.1.0/VTK VTK-7.1.0
# ln -s ParaView-v5.2.0/VTK VTK-7.1.0
#
#------------------------------------------------------------------------------
# run from third-party directory only
# Run from third-party directory only
cd ${0%/*} || exit 1
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment