From e7485da1fac2e6c8f56538d720bcaa8a1f26101c Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Thu, 23 Mar 2017 19:35:08 -0700 Subject: [PATCH] ceph.spec.in: derive _smp_ncpus and use it for -DBOOST_J Signed-off-by: Dan Mick --- ceph.spec.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index 884050ad648f7..ed9e474f34545 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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} -- 2.39.5