For examples that use CMake version 3.0 see the branch Build Status
The basic requirements for most examples are:
CMake v3.5+
A c++ compiler (defaults to gcc)
make
The easiest way to install the above on Ubuntu is as follows
$ sudo apt-get install build-essential $ sudo apt-get install cmake
Some specific examples may require other tools including:
Docker containers with all requirements and various versions of CMake are generated to help make testing the examples easier. These are available from the docker hub repository docker run -it matrim/cmake-examples:3.5.1 cd ~ git clone https://github.com/ttroy50/cmake-examples.git code cd code ./test.sh
For more details on build and running the docker containers dockerfiles.
There are many CMake tutorials and examples online. The list below includes links to some of these which I have found helpful in my CMake journey.
Static Analysis with CDash - Includes some info about using CppCheck with CMake