Fixed reading of flags.cmake