ENH: add versioning for VTK library to runTimePostProcessing (issue #370)

Eg,
    librunTimePostProcessing.so
    librunTimePostProcessing.so.7 -> librunTimePostProcessing.so.7.1.0
    librunTimePostProcessing.so.7.1.0

- centralize handling of paraview/vtk versioning into wmake/cmakeFunctions
This commit is contained in:
Mark Olesen
2017-01-23 13:37:42 +01:00
parent f47e8513d7
commit 9d63cc5ca8
7 changed files with 203 additions and 347 deletions

View File

@ -7,84 +7,8 @@ export WM_CONTINUE_ON_ERROR=true
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
# Source the wmake functions
. $WM_PROJECT_DIR/wmake/scripts/wmakeFunctions
# -----------------------------------------------------------------------------
#
# There are several prerequisites for building plugins
#
#set -x
canBuildPlugin()
{
[ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || {
echo "==> cannot build ParaView plugins without paraview directory"
echo " ParaView_DIR=$ParaView_DIR"
return 1
}
[ -n "$PV_PLUGIN_PATH" ] || {
echo "==> ${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugins"
echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}"
return 1
}
type cmake > /dev/null 2>&1 || {
echo "==> cannot build ParaView plugins without cmake"
return 1
}
return 0 # success
}
#
# Check sentinel file(s) to handle paraview version changes
#
versionOk()
{
findObjectDir "$1" # Where generated files are stored
local sentinel="$objectsDir/ThirdParty"
echo $sentinel
local prev
if read -r prev 2>/dev/null < $sentinel
then
case "$prev" in
("ParaView_DIR=$ParaView_DIR")
return 0
;;
(*)
echo "ParaView_DIR changed between builds" 1>&2
return 1
;;
esac
elif [ -f "$objectsDir/CMakeCache.txt" ]
then
echo "previous build was incomplete" 1>&2
return 1
else
return 0
fi
}
#
# Build library - use sentinel file(s) to handle paraview version changes
#
wmakeLibPv()
{
for libName
do
sentinel=$(versionOk $libName) || wclean $libName # version changed
wmake $targetType $libName && {
echo "ParaView_DIR=$ParaView_DIR" > $sentinel
}
done
}
# Source CMake functions
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions
# -----------------------------------------------------------------------------