cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
23 stars 9 forks source link

cfitsio must be mandatory #35

Closed carmeloevoli closed 1 year ago

carmeloevoli commented 1 year ago

I am trying to install hermes in a new computer and I forgot to install cfitsio beforehand.

cmake .. went smooth, altough I didn't catch the message -- CFITSIO not found. immediately.

When passing to the make however , it generated several errors, mainly due to the fact that hermes::neutralgas::RingModel exists only if CFITSIO has been found, due to the header guard line #ifdef HERMES_HAVE_CFITSIO

Now I installed CFITSIO and it works... My question is: is there a way to stop makefile generation with cmake .. when CFITSIO is not found?

carmeloevoli commented 1 year ago

I added this in CMakeLists.txt:

if(CFITSIO_FOUND)
    ...
else()
    message(FATAL_ERROR "CFITSIO is required.")