rewrite cmake files