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.
This commit is contained in:
mark
2016-11-21 23:09:34 +01:00
parent d23b9bf968
commit ba2c04d454
4 changed files with 38 additions and 13 deletions

View File

@ -41,10 +41,20 @@
# #
setParaViewDirs() 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" ] || { [ -d "$ParaView_SOURCE_DIR" ] || {
echo "did not find ParaView-$ParaView_VERSION in these directories:" 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 " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo echo
echo "abort build" echo "abort build"

View File

@ -42,10 +42,20 @@
# #
setVtkDirs() 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" ] || { [ -d "$VTK_SOURCE_DIR" ] || {
echo "did not find VTK-$VTK_VERSION in these directories:" 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 " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo echo
echo "abort build" echo "abort build"

View File

@ -26,9 +26,12 @@
# makeParaView # makeParaView
# #
# Description # Description
# Make and install paraview 4 or 5 # Make and install ParaView 4 or 5.
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION # The ParaView sources should be located under one of these locations:
# (note capitalisation) # - $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 # Get ParaView_DIR location from OpenFOAM config file

10
makeVTK
View File

@ -26,16 +26,18 @@
# makeVTK # makeVTK
# #
# Description # Description
# Make and install VTK # Make and install VTK.
# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION # 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 # To use the VTK source from the ParaView source tree, simply make an
# appropriate link first. For example, # 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 cd ${0%/*} || exit 1
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"