Here's a simple CMakeLists.txt
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(demo)
add_executable(hello hello.cpp)
This CMakeLists.txt compiles a hello.cpp file to an executable named hello. You can name the executable anything by using the add_executable statement.
add_executable( ...)