Skip to content
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

Multiple executables or tests in the same directory #3

Open
everythingfunctional opened this issue Jun 7, 2020 · 2 comments
Open

Comments

@everythingfunctional
Copy link
Member

Right now, program source files can not be placed in the same folder. The build system sees the other program source files and assumes they are modules. We should discuss whether this restriction should be clearly identified in the user documentation, or whether we want to try and support having multiple program sources in the same folder.

@everythingfunctional
Copy link
Member Author

The main use case I can see for allowing this would be to have modules common to multiple programs or tests, but not included in the library. I would generally be of the opinion that such a situation calls for either putting those modules in the library, or putting them into their own separate library. And by not supporting it, it encourages users to do things the right way.

@certik
Copy link
Member

certik commented Jun 7, 2020

I think Cargo allows to have programs in subdirectories of bin/, and I think it's one executable per subdirectory, and other files are just linked to it. I think that's fine.

Finally, all programs in bin/ directory directly are all separate programs and I think only programs are allowed there.

I think we can follow exactly the same approach.

@awvwgk awvwgk transferred this issue from fortran-lang/fpm Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants