Allwmake 1.6 KB
Newer Older
1
#!/bin/sh
2
3
cd ${0%/*} || exit 1                            # Run from this directory
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions  # The CMake functions
4

5
6
7
8
9
# -----------------------------------------------------------------------------

echo "======================================================================"
echo "${PWD##*/} : $PWD"

10
unset depend runTimePostProDebug
11

12
13
14
15
16
17
18
19
if [ -d "$VTK_DIR" ]
then
    depend="VTK_DIR=$VTK_DIR"
elif [ -d "$ParaView_DIR" ]
then
    depend="ParaView_DIR=$ParaView_DIR"
fi

20
# Force use of dummy only
21
22
# unset depend

23
24
25
# For rebuilding (on error) instead of dropping back to dummy
# runTimePostProDebug=true

26
27
28
29
if [ "$targetType" = objects ]
then
    depend=ignore
elif [ -n "$depend" ]
30
then
31
    if command -v cmake > /dev/null 2>&1
32
    then
33
34
35
36
        cmakeVersioned "$depend" $PWD || {
            echo
            echo "    WARNING: incomplete build of VTK-based post-processing"
            echo
37
38
39
40
            if [ -z "$runTimePostProDebug" ]
            then
                depend="dummy"
            fi
41
42
43
44
        }
    else
        echo "==> skip runTimePostProcessing (needs cmake)"
        depend="dummy"
45
    fi
46
else
47
48
49
50
51
52
53
54
55
    echo "WARNING: skip runTimePostProcessing (no VTK or ParaView)"
    echo "    - ParaView  : export the 'ParaView_DIR' variable"
    echo "    - VTK       : export the 'VTK_DIR'      variable"
fi

if [ "${depend:-dummy}" = dummy ]
then
    echo "==> dummy runTimePostProcessing"
    wmakeVersioned "vtk=dummy" $PWD dummy
56
57
fi

58
59
echo "======================================================================"

60
# -----------------------------------------------------------------------------