mirror of
https://github.com/JHUAPL/kami.git
synced 2026-01-09 14:58:02 -05:00
This is based on GavinNL/cpp_library_template, which seems to be a bit closer to meeting my needs.
28 lines
557 B
Bash
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
|