]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debian/rules: invoke cmake with -DBOOST_J
authorDan Mick <dan.mick@redhat.com>
Thu, 23 Mar 2017 23:36:53 +0000 (16:36 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 24 Mar 2017 17:53:24 +0000 (10:53 -0700)
Allow boost build during toplevel cmake from Debian package build
to benefit from multiple processors.  Should speed build a lot
on many-proc machines (say, arm64).  Use argument passed to
debhelper.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
debian/rules

index d529fdc44b3b3d2e7d616863d8eaf982d4898090..58f3dc579b9120bdfb6ea5cf737dd6d092068327 100755 (executable)
@@ -11,6 +11,10 @@ extraopts += -DWITH_CEPHFS_JAVA=ON
 extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
 extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib
 extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  extraopts += -DBOOST_J=$(NUMJOBS)
+endif
 
 ifeq ($(DEB_HOST_ARCH), armel)
   # armel supports ARMv4t or above instructions sets.