ceph/do_cmake.sh
Kefu Chai 79b55473ef run-make-check,do_cmake: set BOOST_J if !WITH_SYSTEM_BOOS
it's also more readable if we can set the number of make jobs
in a single place.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00

29 lines
502 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
if type ccache > /dev/null 2>&1 ; then
echo "enabling ccache"
ARGS="$ARGS -DWITH_CCACHE=ON"
fi
mkdir build
cd build
if type cmake3 > /dev/null 2>&1 ; then
CMAKE=cmake3
else
CMAKE=cmake
fi
${CMAKE} $ARGS "$@" .. || exit 1
# minimal config to find plugins
cat <<EOF > ceph.conf
plugin dir = lib
erasure code dir = lib
EOF
echo done.