-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Projects with multiple drivers #105
Comments
Here is the project I am trying to convert to be fpm-usable: https://github.com/ivan-pi/fortran_lsp/tree/fpm |
Hi @ivan-pi, regarding multiple drivers I believe the current
This is a good point and should probably be added to the README. |
Thanks @LKedward for pointing me to the previous discussion. It seems that this issue is then a duplicate. @everythingfunctional and @certik, should I close this issue and comment in #91 instead?
I will create a pull request in the next day or two. |
Hi @ivan-pi , thanks for trying out As for the compiler flags, we haven't really gotten a good handle on how to deal with those. The problem mostly comes from what to do with them in terms of dependencies. Does a project's dependencies get compiled with the flags it specified? What about projects that depend on it? What about if you switch compilers? It's on our radar, it's just a really hard problem that we haven't tackled yet. You can close this issue if you feel the other adequately covers it. Also, feel free to open up other issues if you want make sure we keep track of anything else you asked here. |
I believe Cargo supports to have multiple main programs in the It is intuitive and natural. I would expect it to work also. |
It's not that we can't support it, it just makes things more complicated than "everything else in this folder is a module that should be compiled and linked in". We (sort of) support having multiple programs in the |
Yes, it's a little more complicated, but it makes life so much easier for the end user. That is the whole point of fpm. :) |
Yeah, that's probably true. |
|
Cargo does not require any modifications to |
Yes, the sane default of multiple programs in My comment about I actually didn't know (or forgot) that we supported multiple executables by specifying them in fpm.toml, so I was happy to read about it in this thread. |
Yes, that will great !! alias gardhor |
Is this issue still relevant? I recall @LKedward mentioning somewhere that my fortran_lsp repo could be built fpm, meaning that this has been resolved. |
Hi @ivan-pi, yes I believe this issue is now solved. |
Following the discussion at the monthly call, I've installed fpm and am trying to convert a few of my Fortran projects to the recommended structure. These projects involve some legacy fixed-style functions and subroutines, an interface module, and several driver programs (tests). The folder structure is something like:
Do I need to add multiple sections such as
to the TOML file? Right now my build just crashes because of multiple executable files.
I think having multiple executable programs is a quite common type of package, say you have a library for building mesh triangulations, and then with it a small set of command line tools calling routines from this common library.
Another question is can I already specify dependencies on system-wide installed libraries. Say a project (or one of it's dependencies) needs to be linked with
-llapack -lblas
(with the actual LAPACK and BLAS libraries potentially in some non-default location). Does this fit under issue #99 of custom build scripts?I had a few other comments about the installation process, but they were already fixed in #101. A remaining point might be that after doing
stack install
in the fpm folder, the${HOME}/.local/bin/
folder might not be on the path already, requiring an extra commandexport PATH="$PATH:$HOME/.local/bin/"
.The text was updated successfully, but these errors were encountered: