Build CMake from dev sources

If one wishes to build CMake from the Git master branch (or perhaps your own development branch, doing a merge request), assuming you have already cloned CMake and are in the desired branch, as follows.

Build

./bootstrap --prefix=~/.local/cmake-dev --parallel=2 -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON

make -j -l2

make install

This puts the compiled CMake under ~/.local/cmake-dev, without disturbing the primary CMake install. Upon making any CMake code changes, simply recompile the minimum needed bits by:

make

make install

Tests

Run the CMake self-tests by:

~/.local/cmake-dev/bin/ctest -j2 --output-on-failure

Tags:

Categories:

Written by Michael Hirsch, Ph.D. //

Comments