how to use cmake to generate binary