2016-06-22 15:59:48 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
git submodule update --init --recursive
|
|
|
|
if test -e build; then
|
|
|
|
echo 'build dir already exists; rm -rf build and re-run'
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-06-01 16:25:11 +00:00
|
|
|
|
2018-02-19 14:13:15 +00:00
|
|
|
if type ccache > /dev/null 2>&1 ; then
|
2017-06-01 16:25:11 +00:00
|
|
|
echo "enabling ccache"
|
2017-07-19 22:02:02 +00:00
|
|
|
ARGS="$ARGS -DWITH_CCACHE=ON"
|
2017-06-01 16:25:11 +00:00
|
|
|
fi
|
|
|
|
|
2016-06-22 15:59:48 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2017-09-25 21:01:49 +00:00
|
|
|
NPROC=${NPROC:-$(nproc)}
|
2018-07-06 05:25:23 +00:00
|
|
|
if type cmake3 > /dev/null 2>&1 ; then
|
|
|
|
CMAKE=cmake3
|
|
|
|
else
|
|
|
|
CMAKE=cmake
|
|
|
|
fi
|
|
|
|
${CMAKE} -DBOOST_J=$NPROC $ARGS "$@" ..
|
2016-06-30 14:51:55 +00:00
|
|
|
|
2016-10-03 18:52:38 +00:00
|
|
|
# minimal config to find plugins
|
2016-06-30 14:51:55 +00:00
|
|
|
cat <<EOF > ceph.conf
|
|
|
|
plugin dir = lib
|
|
|
|
erasure code dir = lib
|
|
|
|
EOF
|
|
|
|
|
|
|
|
echo done.
|