Files
kami/.ci-files/install_cmake.sh
James P. Howard, II 7d5482c082 All new build system
This is based on GavinNL/cpp_library_template, which seems to be a
bit closer to meeting my needs.
2020-09-24 13:14:18 -04:00

28 lines
557 B
Bash

#!/bin/bash
set -e
set -x
if [[ "$(uname -s)" == 'Darwin' ]]; then
echo "Darwin!"
brew install cmake || true
brew upgrade cmake
else
VERSION=3.13.4
which cmake
wget -q https://github.com/Kitware/CMake/releases/download/v${VERSION}/cmake-${VERSION}-Linux-x86_64.tar.gz -O cmake.tar.gz
tar -xzf cmake.tar.gz
# Remove the original files and copy the new ones over.
#sudo rm -rf /usr/local/cmake-3.12.4/*
sudo cp -r cmake-${VERSION}*/* $(dirname $(dirname $(which cmake)))
which cmake
fi
cmake --version