mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improved encapsulation of MPI (re)builds
- dependency handling relocated from cmakeFunctions to wmakeFunctions and reused for mpi-versioned builds. This allows more checks for configuration parameters and removes hard-code build path information. CONFIG: remove spurious mplibHPMPI entries CONFIG: remove ADIOS1 rules (antiquated)
This commit is contained in:
@ -37,76 +37,6 @@ export CXXFLAGS="$(wmake -show-cxxflags)"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Save build/configure parameter information (dependency) into sentinel file
|
||||
#
|
||||
# 1 - sentinelFile
|
||||
# 2... build/configure parameters
|
||||
#
|
||||
storeDependency()
|
||||
{
|
||||
local sentinel="$1"
|
||||
local depend
|
||||
shift
|
||||
|
||||
if [ -n "$sentinel" ]
|
||||
then
|
||||
mkdir -p "$(dirname "$sentinel")"
|
||||
|
||||
echo '# Build/configure parameters' >| "$sentinel"
|
||||
|
||||
for depend
|
||||
do
|
||||
echo "-- $depend"
|
||||
done >> "$sentinel"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Check sentinel file(s) to handle changed build/configure parameters
|
||||
# such as paraview / vtk version changes
|
||||
#
|
||||
# 1 - sourceDir
|
||||
# 2... build/configure parameters
|
||||
#
|
||||
sameDependency()
|
||||
{
|
||||
local sourceDir="$1"
|
||||
shift
|
||||
local depend objectsDir
|
||||
local compare=0
|
||||
|
||||
# Where generated files are stored
|
||||
objectsDir=$(findObjectDir "$sourceDir") || exit 1 # Fatal
|
||||
local sentinel="$objectsDir/ThirdParty"
|
||||
|
||||
if [ -f "$sentinel" ]
|
||||
then
|
||||
# Create an .update version
|
||||
storeDependency "${sentinel}.update" $@
|
||||
cmp "${sentinel}" "${sentinel}.update" >/dev/null 2>&1
|
||||
compare=$?
|
||||
|
||||
if [ "$compare" -ne 0 ]
|
||||
then
|
||||
echo "build/configure parameters changed between builds" 1>&2
|
||||
fi
|
||||
|
||||
else
|
||||
# No sentinel file: First time, or failed compilation?
|
||||
if [ -f "$objectsDir/CMakeCache.txt" ]
|
||||
then
|
||||
echo "previous build was incomplete" 1>&2
|
||||
compare=1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$sentinel"
|
||||
return "$compare"
|
||||
}
|
||||
|
||||
|
||||
# Resolve the location of cmake (if needed) and call with output
|
||||
# suppressed according to WM_QUIET
|
||||
|
||||
Reference in New Issue
Block a user