refactoring cmake