Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!2Update master prior to v1612 release
...@@ -41,11 +41,21 @@ ...@@ -41,11 +41,21 @@
# #
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:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo echo
echo "abort build" echo "abort build"
exit 1 exit 1
......
...@@ -42,11 +42,21 @@ ...@@ -42,11 +42,21 @@
# #
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:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo echo
echo "abort build" echo "abort build"
exit 1 exit 1
......
...@@ -26,9 +26,12 @@ ...@@ -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
......
...@@ -26,16 +26,18 @@ ...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment