Here is a simple CMakeLists.txt
cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(demo) add_executable(hello hello.cpp)
This CMakeLists.txt compiles the hello.cpp file into an executable file called hello. You can name the executable file any, using the add_executable operator.
add_executable(<executable-name> <source1> <source2> ...)
source share