Replies: 2 comments 6 replies
-
Welcome @jphaupt, I'm happy you found fpm. Stdlib is not yet an fpm package, but we're working on it. Until it is, you can use the up-to-date mirror that @LKedward maintains: https://github.com/LKedward/stdlib-fpm. This describes how to add it as a dependency to your fpm package. To learn how to add dependencies in general, see this section of the packaging guide (maybe outdated in a few places, let us know if something doesn't work), and this section of the manifest reference. You can browse all fpm packages that are in registry here: https://fortran-lang.org/packages/fpm. I look forward to hear how it goes. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the swift reply! By "an fpm package", do you just mean a package built with fpm? It looks like the snippet
simply builds in the current project. While this is great most of the time, I am also wondering about projects already installed (for example, if stdlib one day becomes as commonplace as e.g. C stdlib, then it is likely that most users will have it and many projects would use it and it seems unnecessary that every project have its own copy). It looks to me the options then are to put in an absolute directory (bad idea for other users) or to copy/build in the current project. Is there no way to have stdlib (or stdlib-fpm) installed elsewhere, through fpm, and fpm knowing where to find it (for any system)? I am thinking how any Python programmer could do Also, using stdlib-fpm, I still have not used the Edit: Sorry, I didn't realise I posted this as a reply to myself, instead of a reply to the first response. |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm still new to Fortran but stumbled upon this project, so sorry if my question is ignorant. My first impression was that it would basically be to Fortran what REPL is to Julia or pip to Python. What I found instead seems to be a (very good) alternative to (c)make. However, I am still quite confused by the
install
command. Does this just copy an executable to~/.local/bin
(making the program easier to run from anywhere)? Is it outside the scope of fpm, or can I use fpm to install, e.g. stdlib (which, by the way, has instructions on how to build with make and cmake but not fpm)? I was expecting a workflow something akin toand then in a new project I can simply import stdlib as expected, e.g. from the docs
though I don't know if fpm would need some kind of include/link for stdlib then. Is this sort of thing handled by fpm? If so, how would I go about installing and using libraries (like stdlib)? Otherwise, is there a way for fpm to "find" stdlib as cmake would do, to include already-installed packages (that may have been built by e.g. cmake)?
Beta Was this translation helpful? Give feedback.
All reactions