The CMake tool parses CMakeLists.txt files in every directory to control the build process. An example CMakeLists.txt file, to compile the helloworld example, follows:
cmake_minimum_required(VERSION 2.8.10) project(helloworld) add_executable(helloworld helloworld.c) install(TARGETS helloworld RUNTIME DESTINATION bin)