]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: derive _smp_ncpus and use it for -DBOOST_J 14114/head
authorDan Mick <dan.mick@redhat.com>
Fri, 24 Mar 2017 02:35:08 +0000 (19:35 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 24 Mar 2017 17:53:52 +0000 (10:53 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph.spec.in

index 884050ad648f7b4102f8933766c6a3ed2872dd69..ed9e474f345454bc19281328fb4110030415da02 100644 (file)
@@ -785,6 +785,11 @@ env | sort
 %endif
 %endif
 
+# unlimit _smp_mflags in system macro if not set above
+%define _smp_ncpus_max 0
+# extract the number of processors for use with cmake
+%define _smp_ncpus %(echo %{_smp_mflags} | sed 's/-j//')
+
 mkdir build
 cd build
 cmake .. \
@@ -823,8 +828,9 @@ cmake .. \
 %endif
     $CEPH_EXTRA_CMAKE_ARGS \
 %if 0%{with ocf}
-    -DWITH_OCF=ON
+    -DWITH_OCF=ON \
 %endif
+    -DBOOST_J=%{_smp_ncpus}
 
 make %{?_smp_mflags}