jacobwilliams / json-fortran

A Modern Fortran JSON API
https://jacobwilliams.github.io/json-fortran/
Other
332 stars 83 forks source link

Suggestion for building with INT64 using fpm #515

Closed sainttttt closed 2 years ago

sainttttt commented 2 years ago

Hi! I was wondering what would you recommend the best way to use json-fortran as a dependency for another project using fpm, but also getting it to use INT64. Building it using FoBiS and manually including the library works for me, but I'm not sure what the best way to do this using fpm - or if there is a way at all at the moment. I was wondering what would you recommend?

Thanks!

jacobwilliams commented 2 years ago

I think including --flag "-DINT64" in the fpm build command will work? So, for example, for a release build with gfortran:

fpm build --profile release --compiler gfortran --flag "-DINT64"

sainttttt commented 2 years ago

Thank you that works!