cmake refactor