5 git submodule update
--init --recursive
11 if [ -e $BUILD_DIR ]; then
12 echo "'$BUILD_DIR' dir already exists; either rm -rf '$BUILD_DIR' and re-run, or set BUILD_DIR env var to a different directory name"
17 if [ -r /etc
/os-release
]; then
18 source /etc
/os-release
22 if [ "$VERSION_ID" -eq "32" ] ; then
24 elif [ "$VERSION_ID" -ge "33" ] ; then
29 MAJOR_VER
=$
(echo "$VERSION_ID" |
sed -e 's/\..*$//')
30 if [ "$MAJOR_VER" -ge "8" ] ; then
36 ARGS
+=" -DWITH_RADOSGW_AMQP_ENDPOINT=OFF"
37 ARGS
+=" -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF"
40 elif [ "$(uname)" == FreeBSD
] ; then
42 ARGS
+=" -DWITH_RADOSGW_AMQP_ENDPOINT=OFF"
43 ARGS
+=" -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF"
49 if [[ "$PYBUILD" =~ ^
3(\..
*)?$
]] ; then
50 ARGS
+=" -DWITH_PYTHON3=${PYBUILD}"
53 if type ccache
> /dev
/null
2>&1 ; then
54 echo "enabling ccache"
55 ARGS
+=" -DWITH_CCACHE=ON"
58 if [[ ! "$ARGS $@" =~
"-DBOOST_J" ]] ; then
59 ncpu
=$
(getconf _NPROCESSORS_ONLN
2>&1)
60 [ -n "$ncpu" -a "$ncpu" -gt 1 ] && ARGS
+=" -DBOOST_J=$(expr $ncpu / 2)"
65 if type cmake3
> /dev
/null
2>&1 ; then
70 ${CMAKE} $ARGS "$@" $CEPH_GIT_DIR ||
exit 1
73 # minimal config to find plugins
77 erasure code dir = lib
82 if [[ ! "$ARGS $@" =~
"-DCMAKE_BUILD_TYPE" ]]; then
86 WARNING: do_cmake.sh now creates debug builds by default. Performance
87 may be severely affected. Please use -DCMAKE_BUILD_TYPE=RelWithDebInfo
88 if a performance sensitive build is required.