[cmake] get rid of undefined HAVE_GRIDTYPE warning