-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAllwmake
executable file
·50 lines (42 loc) · 1.43 KB
/
Allwmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
cd "${0%/*}" || exit # Run from this directory
. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
moduleName="kOmegaSSTCND"
if [ "$FOAM_MODULE_PREFIX" = false ]
then
echo "Compilation of $moduleName is disabled (prefix=false)"
exit 0
fi
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "Starting compile of $moduleName"
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
echo " prefix = ${FOAM_MODULE_PREFIX:-default (user)}"
echo
unset prevVersion
if [ -e foamVersionThisIsCompiledFor ]
then
prevVersion=$(<foamVersionThisIsCompiledFor)
fi
if [ -n "$prevVersion" ]
then
if [ "$prevVersion" = "$WM_PROJECT_VERSION" ]
then
echo " Rebuilding for OpenFOAM = $WM_PROJECT_VERSION ($FOAM_API)."
echo
else
echo " Previously compiled for OpenFOAM = $prevVersion"
echo " but now using OpenFOAM = $WM_PROJECT_VERSION ($FOAM_API)."
echo " Use ./Allwclean before compiling"
echo
exit 42
fi
else
echo " Building for OpenFOAM = $WM_PROJECT_VERSION ($FOAM_API)."
echo
echo "${WM_PROJECT_VERSION:-unknown}" >| foamVersionThisIsCompiledFor
fi
wmake kOmegaSSTCND/compressible
wmake kOmegaSSTCND/incompressible
#------------------------------------------------------------------------------