Last active
March 2, 2025 18:44
-
-
Save cwpearson/c0709b0dd526f43d952768151fcd6cde to your computer and use it in GitHub Desktop.
install CMake from source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -eu | |
set -x | |
# create a `cmake` directory and extract cmake into there | |
# build cmake in there, and install to prefix | |
PREFIX=$HOME/software/cmake-3.17.0-rc3 | |
wget -SL https://github.com/Kitware/CMake/releases/download/v3.17.0-rc3/cmake-3.17.0-rc3.tar.gz | |
mkdir -p cmake-3.17.0-rc3.src | |
tar -xvf cmake-3.17.0-rc3.tar.gz --strip-components=1 -C cmake-3.17.0-rc3.src | |
cd cmake-3.17.0-rc3.src | |
./bootstrap --prefix=$PREFIX --parallel=`nproc` | |
mkdir -p $PREFIX | |
nice -n20 make -j`nproc` | |
nice -n20 make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment