mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
cd "${0%/*}" || exit # Run from this directory
|
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Define how to create an mpi-versioned library of $targetType
|
|
# compile into qualified directory
|
|
# use sentinel file to handle version changes
|
|
wmakeMpiLib()
|
|
{
|
|
local objectsDir
|
|
for libName
|
|
do
|
|
(
|
|
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
|
objectsDir="$WM_PROJECT_DIR/build/$WM_OPTIONS/src/Pstream/$libName"
|
|
whichmpi="$objectsDir/using:$FOAM_MPI"
|
|
[ -e "$whichmpi" ] || wclean $libName
|
|
echo "wmake $targetType $libName (mpi=$WM_MPLIB)"
|
|
wmake $targetType $libName
|
|
mkdir -p "$objectsDir"
|
|
touch "$whichmpi"
|
|
)
|
|
done
|
|
}
|
|
|
|
echo "wmake $targetType dummy (mpi=$WM_MPLIB)"
|
|
wmake $targetType dummy
|
|
|
|
case "$WM_MPLIB" in
|
|
(*MPI*)
|
|
wmakeMpiLib mpi
|
|
;;
|
|
esac
|
|
|
|
#------------------------------------------------------------------------------
|