Add main.cpp and CMakeLists.txt with compile definitions