mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
42 lines
862 B
Bash
Executable File
42 lines
862 B
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Parse arguments for library compilation
|
|
. $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()
|
|
{
|
|
set +x
|
|
for libName
|
|
do
|
|
(
|
|
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
|
whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/Pstream/$libName/using:$FOAM_MPI"
|
|
[ -e "$whichmpi" ] || wclean $libName
|
|
echo "wmake $targetType $libName"
|
|
wmake $targetType $libName
|
|
touch "$whichmpi"
|
|
)
|
|
done
|
|
set -x
|
|
}
|
|
|
|
set -x
|
|
wmake $targetType dummy
|
|
|
|
case "$WM_MPLIB" in
|
|
*MPI*)
|
|
set +x
|
|
wmakeMpiLib mpi
|
|
;;
|
|
esac
|
|
|
|
|
|
#------------------------------------------------------------------------------
|