Always build in C++11 mode

refs: #1930

Change-Id: Iedad4a814e5c7e6a5486f2f7e16c45c356131792
diff --git a/.jenkins.d/01-dependencies.sh b/.jenkins.d/01-dependencies.sh
index 01ddadb..63813e5 100755
--- a/.jenkins.d/01-dependencies.sh
+++ b/.jenkins.d/01-dependencies.sh
@@ -1,7 +1,8 @@
 #!/usr/bin/env bash
 set -x
+set -e
 
 sudo apt-get -y install liblog4cxx10-dev protobuf-compiler libprotobuf-dev pkg-config || true
-sudo brew update || true
-brew install log4cxx protobuf pkg-config || true
 
+# Disabled because OSX 10.8 requires special handling of dependencies
+# brew install log4cxx protobuf pkg-config || true
diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
index 465e291..c38011c 100755
--- a/.jenkins.d/10-ndn-cxx.sh
+++ b/.jenkins.d/10-ndn-cxx.sh
@@ -1,5 +1,6 @@
 #!/usr/bin/env bash
 set -x
+set -e
 
 cd /tmp
 BUILD="no"
@@ -30,7 +31,7 @@
 sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
 
 if [ "$BUILD" = "yes" ]; then
-    ./waf distclean --color=yes
+    sudo ./waf distclean --color=yes
 fi
 
 ./waf configure --color=yes --without-osx-keychain
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
diff --git a/.jenkins.d/30-tests.sh b/.jenkins.d/30-tests.sh
index aee9812..433d450 100755
--- a/.jenkins.d/30-tests.sh
+++ b/.jenkins.d/30-tests.sh
@@ -1,4 +1,5 @@
 #!/usr/bin/env bash
 set -x
+set -e
 
 ./build/unit-tests-nlsr -l test_suite