]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
do_cmake,run-make: switch to ninja
authorKefu Chai <kchai@redhat.com>
Thu, 4 Mar 2021 06:28:00 +0000 (14:28 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Mar 2021 11:13:21 +0000 (19:13 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
debian/control
do_cmake.sh
src/script/run-make.sh

index 42044b802d8083e52bf0963147706a85a91487b3..54047dd20420e2f3c0f63239f34acf63f9d36134 100644 (file)
@@ -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,
index 4cb07c106b6c9478be72a40010eebc99b23ebf53..8779d721339c0b3847778078e78ba30d2df43533 100755 (executable)
@@ -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
index e5fc1a91b05c1320fa297b6f92b0df72f200c34d..7f50fafc9fa6f910c04bc3181c1f251e02ad3a14 100755 (executable)
@@ -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
 }