From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- do_cmake.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 do_cmake.sh (limited to 'do_cmake.sh') diff --git a/do_cmake.sh b/do_cmake.sh new file mode 100755 index 00000000..ab8f5c8c --- /dev/null +++ b/do_cmake.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +set -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 + +PYBUILD="2" +if [ -r /etc/os-release ]; then + source /etc/os-release + case "$ID" in + fedora) + if [ "$VERSION_ID" -ge "29" ] ; then + PYBUILD="3" + fi + ;; + rhel|centos) + MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//') + if [ "$MAJOR_VER" -ge "8" ] ; then + PYBUILD="3" + fi + ;; + opensuse*|suse|sles) + PYBUILD="3" + ARGS+=" -DWITH_RADOSGW_AMQP_ENDPOINT=OFF" + ARGS+=" -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF" + ;; + esac +elif [ "$(uname)" == FreeBSD ] ; then + PYBUILD="3" + ARGS+=" -DWITH_RADOSGW_AMQP_ENDPOINT=OFF" + ARGS+=" -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF" +else + echo Unknown release + exit 1 +fi + +if [ "$PYBUILD" = "3" ] ; then + ARGS+=" -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" +fi + +if type ccache > /dev/null 2>&1 ; then + echo "enabling ccache" + ARGS+=" -DWITH_CCACHE=ON" +fi + +mkdir build +cd build +if type cmake3 > /dev/null 2>&1 ; then + CMAKE=cmake3 +else + CMAKE=cmake +fi +${CMAKE} -DCMAKE_BUILD_TYPE=Debug $ARGS "$@" .. || exit 1 + +# minimal config to find plugins +cat < ceph.conf +plugin dir = lib +erasure code dir = lib +EOF + +echo done. +cat <