ceph/do_cmake.sh
Shinobu Kinjo 5a3eed74d8 vstart.sh: drop .ceph_port and use randomly selected available port
vstart.sh becomes independent of do_cmake.sh

Signed-off-by: Shinobu Kinjo <shinobu@redhat.com>
2017-12-01 12:16:06 +09:00

26 lines
443 B
Bash
Executable File

#!/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
ARGS=""
if which ccache ; then
echo "enabling ccache"
ARGS="$ARGS -DWITH_CCACHE=ON"
fi
mkdir build
cd build
NPROC=${NPROC:-$(nproc)}
cmake -DBOOST_J=$NPROC $ARGS "$@" ..
# minimal config to find plugins
cat <<EOF > ceph.conf
plugin dir = lib
erasure code dir = lib
EOF
echo done.