From: Kefu Chai Date: Thu, 4 Mar 2021 06:28:00 +0000 (+0800) Subject: do_cmake,run-make: switch to ninja X-Git-Tag: v17.1.0~2681^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b05ea0d6e46b2258ea1d4d748be50b703319c431;p=ceph.git do_cmake,run-make: switch to ninja Signed-off-by: Kefu Chai --- diff --git a/debian/control b/debian/control index 42044b802d80..54047dd20420 100644 --- a/debian/control +++ b/debian/control @@ -74,6 +74,7 @@ Build-Depends: automake, # Make-Check libxmlsec1-dev, # Crimson libyaml-cpp-dev, lsb-release, +# Make-Check ninja-build, # Jaeger nlohmann-json-dev | nlohmann-json3-dev, parted, patch, diff --git a/do_cmake.sh b/do_cmake.sh index 4cb07c106b6c..8779d721339c 100755 --- a/do_cmake.sh +++ b/do_cmake.sh @@ -14,6 +14,7 @@ if [ -e $BUILD_DIR ]; then fi PYBUILD="2" +ARGS="-GNinja" if [ -r /etc/os-release ]; then source /etc/os-release case "$ID" in diff --git a/src/script/run-make.sh b/src/script/run-make.sh index e5fc1a91b05c..7f50fafc9fa6 100755 --- a/src/script/run-make.sh +++ b/src/script/run-make.sh @@ -121,10 +121,14 @@ function configure() { function build() { local targets="$@" + if test -n $targets; then + targets="--target $targets" + fi $DRY_RUN cd build BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS} test "$BUILD_MAKEOPTS" && echo "make will run with option(s) $BUILD_MAKEOPTS" - $DRY_RUN make $BUILD_MAKEOPTS $targets || return 1 + # older cmake does not support --parallel or -j, so pass it to underlying generator + $DRY_RUN cmake --build . $targets -- $BUILD_MAKEOPTS || return 1 $DRY_RUN ccache -s # print the ccache statistics to evaluate the efficiency }