Cmake is a high-level build tool, which produces Makefiles (among others) from CMakeLists.txt specifying your code for you.
You have to call it with the path to the directory containing the CMakeLists.txt, so call it with "cmake ." (include the dot).
Then it should generate a Makefile, which you utilize by doing "make".