# Exit on error:
set -e

wget http://cmake.org/files/v3.24/cmake-3.24.0.tar.gz
tar xf cmake-3.24.0.tar.gz
cd cmake-3.24.0

# Use GCC 5.2.0:
export CC=/local/bin/gcc
export CXX=/local/bin/g++

# GLIBCXX 3.4.18, 3.4.20 and 3.4.21 from GCC 5.2.0:
LD_LIBRARY_PATH=/local/lib

./configure --prefix=/local
make
make install
cd ..
rm -rf cmake-3.24.0
rm cmake-3.24.0.tar.gz

exit 0
