Always build in C++11 mode
refs: #1930
Change-Id: Iedad4a814e5c7e6a5486f2f7e16c45c356131792
diff --git a/.jenkins.d/20-build.sh b/.jenkins.d/20-build.sh
index 7b72060..464a7ea 100755
--- a/.jenkins.d/20-build.sh
+++ b/.jenkins.d/20-build.sh
@@ -1,16 +1,37 @@
#!/usr/bin/env bash
set -x
+set -e
git submodule init
git submodule sync
git submodule update
-# actual build
-./waf distclean --color=yes
+COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" )
-COVERAGE=`python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''"`
+# Cleanup
+sudo ./waf -j1 --color=yes distclean
-CXXFLAGS="-Wall -Wno-long-long -O2 -g -Werror" ./waf configure --color=yes --with-tests $COVERAGE
+# Configure/build in debug mode
+./waf -j1 --color=yes configure --with-tests --debug
+./waf -j1 --color=yes build
+
+# Cleanup
+sudo ./waf -j1 --color=yes distclean
+
+# Configure/build in optimized mode without tests
+./waf -j1 --color=yes configure
+./waf -j1 --color=yes build
+
+# Cleanup
+sudo ./waf -j1 --color=yes distclean
+
+# Configure/build in optimized mode with tests
+./waf -j1 --color=yes configure --with-tests $COVERAGE
+./waf -j1 --color=yes build
+
+# (tests will be run against optimized version)
+
+./waf configure --color=yes --with-tests $COVERAGE
./waf -j1 --color=yes
sudo ./waf install --color=yes