Write your CMakeLists.txt such as
Make a directory to store the compiled files, such as build using
cd build, then execute
CMake will generate all the file need within the current directory, i.e.,
With the generated Makefile, we
make to compile the program.
A Random #TIL# for You