  Cosmic rays (CRs) can be studied through the galaxy-wide gamma-ray emission
that they generate when propagating in the interstellar medium. The comparison
of the diffuse signals from different systems may inform us about the key
parameters in CR acceleration and transport. We aim to determine and compare
the properties of the CR-induced gamma-ray emission of several Local Group
galaxies. We use 2 years of nearly continuous sky-survey observations obtained
with the Large Area Telescope aboard the Fermi Gamma-ray Space Telescope to
search for gamma-ray emission from M31 and M33. We compare the results with
those for the Large Magellanic Cloud, the Small Magellanic Cloud, the Milky
Way, and the starburst galaxies M82 and NGC253. We detect a gamma-ray signal at
5sigma significance in the energy range 200 MeV-20 GeV that is consistent with
originating from M31. The integral photon flux above 100MeV amounts to 9.1 +/-
1.9 (stat) +/- 1.0 (sys) x10e-9 ph/cm2/s. We find no evidence for emission from
M33 and derive an upper limit on the photon flux >100MeV of 5.1 x10e-9 ph/cm2/s
(2sigma). Comparing these results to the properties of other Local Group
galaxies, we find indications for a correlation between star formation rate and
gamma-ray luminosity that also holds for the starburst galaxies. The gamma-ray
luminosity of M31 is about half that of the Milky Way, which implies that the
ratio between the average CR densities in M31 and the Milky Way amounts to 0.35
+/- 0.25. The observed correlation between gamma-ray luminosity and star
formation rate suggests that the flux of M33 is not far below the current upper
limit from the LAT observations.
