From ddacfcc0e04341fa9ff2de520fe04687de41ab22 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 2 Aug 2019 20:23:32 +0800 Subject: [PATCH] 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 --- install-deps.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install-deps.sh b/install-deps.sh index 4addfbed7cd10..80f8861565ace 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 <