cmake_minimum_required(VERSION 2.8) set(Prog_NAME "HelloWorld") add_definitions(-DPROGRAM_NAME=\"${Prog_NAME}\") add_executable (helloworld main.cpp)