diff --git a/debian/rules b/debian/rules index eccb45f49..3cbd405af 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,8 @@ export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) BOOTSTRAP_PARALLEL = --parallel=$(NUMJOBS) +else + NUMJOBS = 1 endif BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)") @@ -51,8 +53,8 @@ override_dh_auto_configure: $(BUILD_FLAGS_FILE) override_dh_auto_test: # Pass -j1 to "make test" as a workaround, see https://gitlab.kitware.com/cmake/cmake/issues/17165 - # The tests are still run in parallel as debhelper pass -jX as ARGS to ctest. - dh_auto_test --buildsystem=cmake -- -j1 ARGS="-E CTestTestUpload --timeout 5000" + # The tests are still run in parallel as -jX is passed via ARGS to ctest. + dh_auto_test --buildsystem=cmake -- -j1 ARGS="-E CTestTestUpload --timeout 5000 -j$(NUMJOBS)" execute_after_dh_auto_clean: rm -f $(BUILD_FLAGS_FILE)