Create a tutorial.cxx file with the following code:


using namespace std;

int main()
 cout<<"Hello world"<<endl;
 return 0;

Create a CMakeLists.txt in the same folder of tutorial.cxx with the following code:

cmake_minimum_required(VERSION 2.6)

add_executable(Tutorial tutorial.cxx)

In order to keep the build files easy to remove, create a build folder by running

mkdir build && cd build

Run Cmake and then make

cmake .. && make