How to build and install cmocka?

Step into directory containing sources and create build sub-directory.

Step into build directory and execute

$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
$ make

Installing

$ sudo make install

Download cmocka

cmocka at GitHub

cmocka