Skip to content

Commit

Permalink
deb,rpm,do_cmake: switch to cmake3
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jul 6, 2018
1 parent eeadc06 commit af2c91a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 11 additions & 2 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 6 additions & 1 deletion do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af2c91a

Please sign in to comment.