This tutorial covers the basic of getting started with CMake.
Clone the repo and do the following:
~/CMakeTutorial$ mkdir build && cd build
~/CMakeTutorial$ cmake .. && make
The executable is placed under the build/
directory. To run it simply:
~/CMakeTutorial$ cd build/
~/CMakeTutorial/build$ ./MY_FIRST_CMAKE
Here gtest
is used to write unit tests. One can run it after running the make file.
~/CMakeTutorial/build$ ctest -VV