cmake improvement for GNU