5 echo "Starting Flags.sh $*"
12 # Get an ON/OFF string from a command:
14 if "$@" > /dev/null ; then
21 [ $# -eq 3 ] || die "Needs 3 arguments : MC SMPI DEBUG"
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
68 echo "Step ${STEP}/${NSTEPS} - Building with debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}"
70 if [ "${builddebug}/${buildsmpi}/${buildmc}" = "ON/ON/ON" ]; then
71 # ${buildmc}=ON because "why not", and especially because it doesn't
72 # compile with -D_GLIBCXX_DEBUG and -Denable_ns3=ON together
73 export CXXFLAGS=-D_GLIBCXX_DEBUG
79 cmake -Denable_documentation=OFF \
80 -Denable_compile_optimizations=${runtests} -Denable_compile_warnings=ON \
81 -Denable_mallocators=ON -Denable_debug=${builddebug} \
82 -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \
83 -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_MBI_testsuite=OFF \
84 -Denable_ns3=$(onoff test "$buildmc" != "ON") -DNS3_HINT=/builds/ns-3-dev/build/ \
85 -Denable_coverage=OFF -DLTO_EXTRA_FLAG="auto" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
90 if [ "$runtests" = "ON" ]; then
91 # exclude tests known to fail with _GLIBCXX_DEBUG
92 ctest -j$NUMPROC -E '^[ps]thread-|mc-bugged1-liveness' --output-on-failure