write cmake script