refactor cmake file