Replace compile.sh with cmake