cmake: Improve some error messages

Lessons learned from the Q-bio summer school

Change-Id: I521a08ba3a83566582137740a0d097c0637d7d3e