fix passing cflags to cmake
fix cflag inconsistencies