[build system] Conan integration

Has anyone here experience with Conan ? Have not used it myself, but it seems likely that I will have to deal with it soon so I would like to prepare before and see if it would be possible to integrate fpm build for some Fortran libraries in a build pipeline using Conan.

In their doc they show integration with other build systems Integrations — conan 2.0.17 documentation. Wondering how it might look like for fpm.

1 Like

I have some experience with it and its public registry. I can’t say that I am a big fun of the tool, but recently I have been having similar thoughts myself; how easy would it be for fpm to use conan as a registry backend? Or more generally, could we use conan to redistribute our Fortran libraries?

My lack of enthusiasm mostly stems from conan v1.x. v2.x is a massive improvement, partially due to a large rewrite of the conan codebase. A fundamental problem with these types of build systems is that maintainers (or packagers) need to keep the registry entries updated, which is easier said than done.

I was reading about that massive change on their side. But well, at this point I’m just thinking how could they made to play along locally, in the sense that I create my local registry (or repository) and then plug in a Fortran package for it to be built with fpm and that Conan catches the required info for downstream compilation.

I am not sure if I will have time, but it would be interesting to look into this. Since we are building (and funding) our own registry with fpm we should probably know what others are doing in this space.

I might be able to invest some hours on this as part of my day job. I will update if there are any changes on my end.

1 Like

Thanks a lot @gnikit! On my end is not urgent either. But any info you manage to get will be really useful.

I have just found out that in the compiler explorer platform it is possible to request for libraries to be added:

They use Conan far adding packages. I have opened an issue to request stdlib being availble through their platform [LIB REQUEST] Fortran stdlib · Issue #6025 · compiler-explorer/compiler-explorer · GitHub. No idea if it would be possible but it would help exposing stdlib I think. It could be a good way to see how fpm packages can be shipped through Conan ?

1 Like

I think we might have to setup stldlib’s package with the public registry of Conan. It shouldn’t be too much of a hassle to setup (famous last words). I will look into it over the next few weeks (can’t exactly promise when :confused:)

1 Like

No rush really! Would be nice to have it there though, I use compiler explorer a lot for small code snippets and having stdlib there would be brilliant!