]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
run-make-check,do_cmake: set BOOST_J if !WITH_SYSTEM_BOOS 23995/head
authorKefu Chai <kchai@redhat.com>
Sun, 9 Sep 2018 08:07:07 +0000 (16:07 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 11 Sep 2018 14:22:47 +0000 (22:22 +0800)
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>
do_cmake.sh
run-make-check.sh

index e583c23732472d572c72e28938e188f2f64cf57b..15cc01242fd8c039748ca4e50f025d076166d695 100755 (executable)
@@ -12,13 +12,12 @@ fi
 
 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
index be52f5fa1e412e2361e95355f19f387752994cb6..a3a50dfd58390da23d6fbfd57c26f486fe2117df 100755 (executable)
@@ -55,6 +55,8 @@ function detect_ceph_dev_pkgs() {
     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"
 }