From: Kefu Chai Date: Fri, 2 Aug 2019 12:23:32 +0000 (+0800) Subject: install-deps.sh: install cmake 3.10.2 and up on xenial X-Git-Tag: v15.1.0~1972^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ddacfcc0e04341fa9ff2de520fe04687de41ab22;p=ceph.git install-deps.sh: install cmake 3.10.2 and up on xenial to enable us to build on xenial, install newer cmake. cmake 3.10.2 is the version offered by bionic. with this change, we can safely require cmake 3.10.2 in our cmake script. as EPEL7 offers cmake 3.13 Signed-off-by: Kefu Chai --- diff --git a/install-deps.sh b/install-deps.sh index 4addfbed7cd1..80f8861565ac 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -124,6 +124,22 @@ ENDOFKEY $SUDO ln -nsf /usr/bin/g++ /usr/bin/$(uname -m)-linux-gnu-g++ } +function ensure_decent_cmake_on_ubuntu { + local new=$1 + if command -v cmake > /dev/null; then + local old=$(cmake --version | grep -Po 'version \K[0-9].*') + if dpkg --compare-versions $old ge $new; then + return + fi + fi + $SUDO curl --silent https://apt.kitware.com/keys/kitware-archive-latest.asc | $SUDO apt-key add - + $SUDO tee /etc/apt/sources.list.d/kitware.list <