Merge pull request #22896 from tchaikov/wip-cmake3

deb,rpm,do_cmake: switch to cmake3

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
This commit is contained in:
Kefu Chai 2018-07-07 00:46:16 +08:00 committed by GitHub
commit 00d1038d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View 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} \

2
debian/control vendored
View 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,

View File

@ -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