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>
mkdir build
cd build
-NPROC=${NPROC:-$(nproc)}
if type cmake3 > /dev/null 2>&1 ; then
CMAKE=cmake3
else
CMAKE=cmake
fi
-${CMAKE} -DBOOST_J=$NPROC $ARGS "$@" .. || exit 1
+${CMAKE} $ARGS "$@" .. || exit 1
# minimal config to find plugins
cat <<EOF > ceph.conf
local boost_root=/opt/ceph
if test -f $boost_root/include/boost/config.hpp; then
cmake_opts+=" -DWITH_SYSTEM_BOOST=ON -DBOOST_ROOT=$boost_root"
+ else
+ cmake_opts+=" -DBOOST_J=$(get_processors)"
fi
echo "$cmake_opts"
}