mirror of
https://github.com/ceph/ceph
synced 2024-12-26 13:33:57 +00:00
9b99018b99
so that one can do stuff like ARGS="-DCMAKE_C_COMPILER=gcc-7 -D.." ./do_cmake.sh Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
25 lines
435 B
Bash
Executable File
25 lines
435 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 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.
|