diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 2caa1f4cece743b29d78978ada7fc422876bc019..6a9b28f94e0ccc1b73c6fb8f014e2a936b59c9e1 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -302,4 +302,10 @@ fi
 if [ "${OSNAME}" == "macosx" ]; then
   MACOSX_DEPLOYMENT_TARGET="10.7"
   export_env MACOSX_DEPLOYMENT_TARGET
+  if [ -n "${CPPFLAGS}" ]; then
+    CPPFLAGS="${CPPFLAGS} -DBOOST_NO_CXX11_RVALUE_REFERENCES"
+  else
+    CPPFLAGS="-DBOOST_NO_CXX11_RVALUE_REFERENCES"
+  fi
+  export_env CPPFLAGS
 fi