From f79c820d2e153f0a77ffb6b55609f704caad266a Mon Sep 17 00:00:00 2001 From: Ori Shalev Date: Fri, 8 Feb 2019 12:01:46 -0800 Subject: [PATCH] Added rsocket-cpp dependency to Ubuntu 16.04 build script --- .../scripts/order_ubuntu-16.04/14_rsocket-cpp | 1 + mcrouter/scripts/recipes/rsocket-cpp.sh | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 120000 mcrouter/scripts/order_ubuntu-16.04/14_rsocket-cpp create mode 100755 mcrouter/scripts/recipes/rsocket-cpp.sh 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