Proper use of cmake