diff --git a/mcrouter/scripts/order_ubuntu-16.04/14_rsocket-cpp b/mcrouter/scripts/order_ubuntu-16.04/14_rsocket-cpp new file mode 120000 index 000000000..a5ad6a2ad --- /dev/null +++ b/mcrouter/scripts/order_ubuntu-16.04/14_rsocket-cpp @@ -0,0 +1 @@ +../recipes/rsocket-cpp.sh \ No newline at end of file diff --git a/mcrouter/scripts/recipes/rsocket-cpp.sh b/mcrouter/scripts/recipes/rsocket-cpp.sh new file mode 100755 index 000000000..13135f03d --- /dev/null +++ b/mcrouter/scripts/recipes/rsocket-cpp.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +source common.sh + +if [[ ! -d rsocket-cpp ]]; then + git clone https://github.com/rsocket/rsocket-cpp.git + cd "$PKG_DIR/rsocket-cpp" || die "cd fail" + if [[ -f "$REPO_BASE_DIR/mcrouter/RSOCKETCPP_COMMIT" ]]; then + RSOCKETCPP_COMMIT="$(head -n 1 "$REPO_BASE_DIR/mcrouter/RSOCKETCPP_COMMIT")" + echo "RSOCKETCPP_COMMIT file found: using rsocket-cpp commit $RSOCKETCPP_COMMIT" + git checkout "$RSOCKETCPP_COMMIT" + else + echo "No RSOCKETCPP_COMMIT file, using rsocket-cpp HEAD=$(git rev-parse HEAD)" + fi +fi + +cd "$PKG_DIR/rsocket-cpp/build" || die "cd fail" +rm -f ../CMakeCache.txt + +cmake .. -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DBUILD_TESTS=OFF +make $MAKE_ARGS gmock +make $MAKE_ARGS && make install $MAKE_ARGS