Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / tools / jenkins / Flags.sh
1 #!/bin/sh
2
3 set -e
4
5 die() {
6     echo "$@"
7     exit 1
8 }
9
10 do_cleanup() {
11   for d in "$WORKSPACE/build"
12   do
13     if [ -d "$d" ]
14     then
15       rm -rf "$d" || die "Could not remote $d"
16     fi
17   done
18 }
19
20 ###¬†Cleanup previous runs
21
22 ! [ -z "$WORKSPACE" ] || die "No WORKSPACE"
23 [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
24
25 do_cleanup
26
27 for d in "$WORKSPACE/build"
28 do
29   mkdir "$d" || die "Could not create $d"
30 done
31
32 NUMPROC="$(nproc)" || NUMPROC=1
33
34 cd $WORKSPACE/build
35
36 for buildjava in ON OFF
37 do
38   for buildmalloc in ON OFF
39   do
40     for buildsmpi in ON OFF
41     do
42       for buildmc in ON OFF
43       do
44         echo "build with java=${buildjava}, mallocators=${buildmalloc}, SMPI=${buildsmpi}, MC=${buildmc}"
45         cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=${buildjava} \
46               -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
47               -Denable_jedule=ON -Denable_mallocators=${buildmalloc} \
48               -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \
49               -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=OFF -Denable_coverage=OFF $WORKSPACE
50         make -j$NUMPROC
51         make clean
52       done
53     done
54   done
55 done 
56