CMake: Autotools replacement

Most linux users nowadays are used to compiling with autotools, specifially using the ./configure command before building with make. CMake is the new kid on the block offering a nice replacement for autotools as it has colored output incl. progress percentage.

Building with CMake is a simple as with Autotools.
First create a "build" directory in the cloned git repository and switch to it:
mkdir build; cd build.

Now instead of ./configure we're going to run cmake .. optionally adding DCMAKE_BUILD_TYPE=Release if we wan't the Release version, alternatively we can use Debug.

Finally we call make -jX where X is the amount of threads used for compiling the binary.
X should be the amount of CPU threads + 1.[1]

Finally, as always, install the newly created binary using: sudo make install.


  1. To find out how many cores/threads your CPU has, check the output of the following command: lscpu. ↩︎