5 echo "Starting Flags.sh $*"
12 # Get an ON/OFF string from a command:
14 if "$@" > /dev/null ; then
21 [ $# -eq 5 ] || die "Needs 5 arguments : JAVA MC SMPI DEBUG MSG"
23 ### Cleanup previous runs
25 [ -n "$WORKSPACE" ] || die "No WORKSPACE"
26 [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
33 rm -rf "$d" || die "Could not remove $d"
35 mkdir "$d" || die "Could not create $d"
39 do_cleanup "$WORKSPACE/build"
41 NUMPROC="$(nproc)" || NUMPROC=1
45 #we can't just receive ON or OFF as values as display is bad in the resulting jenkins matrix
82 if [ $buildmsg = "OFF" ] && [ $buildjava = "ON" ]
84 echo "Don't even try to build Java without MSG"
88 echo "Step ${STEP}/${NSTEPS} - Building with java=${buildjava}, debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}, MSG=${buildmsg}"
89 cmake -Denable_documentation=OFF -Denable_java=${buildjava} -Denable_msg=${buildmsg} \
90 -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
91 -Denable_mallocators=ON -Denable_debug=${builddebug} \
92 -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \
93 -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=OFF \
94 -Denable_ns3=$(onoff test "$buildmc" != "ON") -Denable_coverage=OFF -DLTO_EXTRA_FLAG="auto" "$WORKSPACE"