]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
deb,rpm,do_cmake: switch to cmake3 22896/head
authorKefu Chai <kchai@redhat.com>
Fri, 6 Jul 2018 05:25:23 +0000 (13:25 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 6 Jul 2018 05:29:21 +0000 (13:29 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in
debian/control
do_cmake.sh

index 1891248c5c99de0628e49bcdb995c8aaa21e42c2..07553ac358dd8780b6d02360059326869af2861d 100644 (file)
@@ -120,7 +120,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
@@ -892,7 +896,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 e394b6fed0fd3454f46fc816d484fa72d7f84659..dc214f9e9ce28c8aa1b7b0bb8e235606a398f074 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