automating via cmake