Improve CMAKE script