-cmake -Denable_documentation=OFF \
- -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
+
+if [ "${builddebug}/${buildsmpi}/${buildmc}" = "ON/ON/ON" ]; then
+ # ${buildmc}=ON because "why not", and especially because it doesn't
+ # compile with -D_GLIBCXX_DEBUG and -Denable_ns3=ON together
+ export CXXFLAGS=-D_GLIBCXX_DEBUG
+ runtests="ON"
+else
+ runtests="OFF"
+fi
+
+GENERATOR="Unix Makefiles"
+BUILDER=make
+VERBOSE_BUILD="VERBOSE=1"
+if which ninja 2>/dev/null >/dev/null ; then
+ GENERATOR=Ninja
+ BUILDER=ninja
+ VERBOSE_BUILD="-v"
+fi
+
+cmake -G"$GENERATOR" -Denable_documentation=OFF \
+ -Denable_compile_optimizations=${runtests} -Denable_compile_warnings=ON \