THRIFT-3659 Check configure result of CMake on CI

This closes #886
diff --git a/build/docker/scripts/cmake.sh b/build/docker/scripts/cmake.sh
index 0b92c5b..21b7fc6 100755
--- a/build/docker/scripts/cmake.sh
+++ b/build/docker/scripts/cmake.sh
@@ -3,6 +3,12 @@
 
 mkdir -p cmake_build && cd cmake_build
 cmake $* ..
+for LIB in $BUILD_LIBS; do
+  if ! grep "^BUILD_${LIB}:BOOL=ON$" CMakeCache.txt ; then
+    echo "failed to configure $LIB"
+    exit 1
+  fi
+done
 make -j3
 cpack
 ctest -VV -E "(concurrency_test|processor_test)"