mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: robuster storage of pv/vtk sentinel files with out-of-source builds
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -61,6 +61,22 @@ sameDependency()
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Save dependency information into sentinel file
|
||||
#
|
||||
storeDependency()
|
||||
{
|
||||
local depend="$1"
|
||||
local sentinel="$2"
|
||||
|
||||
if [ -n "$sentinel" ]
|
||||
then
|
||||
mkdir -p "$(dirname "$sentinel")"
|
||||
echo "$depend" >| "$sentinel"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
# CMake with output suppressed according to WM_QUIET
|
||||
_cmake()
|
||||
@ -98,7 +114,7 @@ cmakeVersioned()
|
||||
|
||||
mkdir -p "$objectsDir" \
|
||||
&& (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make) \
|
||||
&& echo "$depend" >| "${sentinel:-/dev/null}"
|
||||
&& storeDependency "$depend" "$sentinel"
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +140,7 @@ cmakeVersionedInstall()
|
||||
|
||||
mkdir -p "$objectsDir" \
|
||||
&& (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make install) \
|
||||
&& echo "$depend" >| "${sentinel:-/dev/null}"
|
||||
&& storeDependency "$depend" "$sentinel"
|
||||
}
|
||||
|
||||
|
||||
@ -151,7 +167,7 @@ wmakeVersioned()
|
||||
|
||||
mkdir -p "$objectsDir" \
|
||||
&& wmake "$@" \
|
||||
&& echo "$depend" >| "${sentinel:-/dev/null}"
|
||||
&& storeDependency "$depend" "$sentinel"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -97,11 +97,11 @@ wmakeLibPv()
|
||||
|
||||
for libName
|
||||
do
|
||||
sentinel=$(sameDependency "$depend" $libName) || \
|
||||
sentinel=$(sameDependency "$depend" "$libName") || \
|
||||
wclean $libName
|
||||
|
||||
wmake $targetType $libName \
|
||||
&& echo "$depend" > ${sentinel:-/dev/null}
|
||||
&& storeDependency "$depend" "$sentinel"
|
||||
done
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ get_pvplugin_api()
|
||||
#
|
||||
have_pvplugin_support()
|
||||
{
|
||||
local header settings warn pv_api installDir binDir includeDir targetDir
|
||||
local header warn pv_api installDir binDir includeDir targetDir
|
||||
warn="==> skip paraview-plugin"
|
||||
|
||||
# Trivial check
|
||||
|
||||
Reference in New Issue
Block a user