Commit dd2c7c48 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: add wmakeVersioned with tracking of ThirdParty dependencies

- primarily for handling cmake replacement libraries
parent 9076f5b2
......@@ -124,4 +124,31 @@ cmakeVersionedInstall()
}
# wmake with tracking of external dependency as per cmakeVersioned
# - use sentinel file(s) to handle paraview/vtk version changes
#
# 1 - depend
# 2 - sourceDir
# 3... wmake arguments
#
wmakeVersioned()
{
local depend="$1"
local sourceDir="$2"
shift 2
local objectsDir sentinel
# Where generated files are stored
objectsDir=$(findObjectDir "$sourceDir") || exit 1 # Fatal
# Version changed
sentinel=$(sameDependency "$depend" "$sourceDir") || \
rm -rf "$objectsDir" > /dev/null 2>&1
mkdir -p "$objectsDir" \
&& wmake "$@" \
&& echo "$depend" >| "${sentinel:-/dev/null}"
}
#------------------------------------------------------------------------------
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