]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
deb,rpm,do_cmake: switch to cmake3 27971/head
authorKefu Chai <kchai@redhat.com>
Fri, 6 Jul 2018 05:25:23 +0000 (13:25 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 11 Jul 2019 10:07:26 +0000 (12:07 +0200)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit af2c91ace6c1082925f118d145937ae55fa780d4)

ceph.spec.in
debian/control
do_cmake.sh

index bc08fecb2eaf2af1b204978e0672c1d0ab323cf9..fe2f10e56d443a5a7fbe4ec3db11636b86610661 100644 (file)
@@ -126,7 +126,11 @@ BuildRequires:     selinux-policy-devel
 %endif
 BuildRequires: bc
 BuildRequires: gperf
-BuildRequires:  cmake
+%if 0%{?rhel} == 7
+BuildRequires:  cmake3 > 3.5
+%else
+BuildRequires:  cmake > 3.5
+%endif
 BuildRequires: cryptsetup
 BuildRequires: fuse-devel
 %if 0%{?rhel} == 7
@@ -899,7 +903,12 @@ env | sort
 
 mkdir build
 cd build
-cmake .. \
+%if 0%{?rhel} == 7
+CMAKE=cmake3
+%else
+CMAKE=cmake
+%endif
+${CMAKE} .. \
     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
     -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
     -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
index adcd5397ce3c97c0f11d977a90a6e09aaece8d48..39c6ebb04412a01a423ba23dd38922d15a110a32 100644 (file)
@@ -9,7 +9,7 @@ Uploaders: Ken Dreyer <kdreyer@redhat.com>,
            Alfredo Deza <adeza@redhat.com>,
 Build-Depends: bc,
                btrfs-tools,
-               cmake,
+               cmake (>= 3.5),
                cpio,
                cryptsetup-bin | cryptsetup,
                cython,
index b2d7594ae91fd89d4d2a38cef5bb164e78419127..c7599859bc80bb5b060077f304ecb094108edaa9 100755 (executable)
@@ -13,7 +13,12 @@ fi
 mkdir build
 cd build
 NPROC=${NPROC:-$(nproc)}
-cmake -DBOOST_J=$NPROC $ARGS "$@" ..
+if type cmake3 > /dev/null 2>&1 ; then
+    CMAKE=cmake3
+else
+    CMAKE=cmake
+fi
+${CMAKE} -DBOOST_J=$NPROC $ARGS "$@" ..
 
 # minimal config to find plugins
 cat <<EOF > ceph.conf