Skip to content

[WIP] Add support for Fortran Package Manager #30

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ivan-pi
Copy link
Collaborator

@ivan-pi ivan-pi commented Mar 19, 2024

These changes allow the use of the Fortran package manager. (preCICE needs to be installed separately however)

~/fortran/fortran-module$ fpm build --link-flag "-L/usr/local/lib/"
 + mkdir -p build/dependencies
precice.f90                            done.
libprecice-fortran-module.a            done.
solverdummy.f90                        done.
solverdummy                            done.
[100%] Project compiled successfully.

Other projects could then use this module as a dependency, by adding the following to their manifest:

[dependencies]
precice-fortran-module.git = "https://github.com/precice/fortran-module"

and making sure libprecice.* is available in the compiler search path.

Work remaining:

  • finalize manifest
  • build example using the setup-fpm action

@ivan-pi
Copy link
Collaborator Author

ivan-pi commented Mar 19, 2024

The main changes are:

  • adding the fpm.toml manifest file
  • moving precice.f90 into the src/ folder (fpm expects a canonical layout)

(Sorry I mistakenly based this off the wrong branch, hence the one extra commit).

@ivan-pi ivan-pi changed the title Add support for Fortran Package Manager [WIP] Add support for Fortran Package Manager Mar 19, 2024
Comment on lines +4 to +8
author = "Jane Doe"
maintainer = "jane.doe@example.com"
copyright = "Copyright 2021, Jane Doe"
description = "precice Fortran module"
homepage = "https://precice.org/index.html"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
author = "Jane Doe"
maintainer = "jane.doe@example.com"
copyright = "Copyright 2021, Jane Doe"
description = "precice Fortran module"
homepage = "https://precice.org/index.html"
author = "preCICE developers"
maintainer = "info@precice.org"
copyright = "Copyright 2024, preCICE developers"
description = "preCICE Fortran module"
homepage = "https://precice.org/"

Comment on lines +1 to +3
name = "precice-fortran-module"
version = "0.1.0"
license = "license"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "precice-fortran-module"
version = "0.1.0"
license = "license"
name = "precice-fortran-module"
license = "LGPL-3.0"

@ivan-pi
Copy link
Collaborator Author

ivan-pi commented Mar 22, 2024

ToDo list:

  • change folder path in Makefile
  • adapt CI and examples
  • add fpm usage to README
  • versioning (new issue)

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

Successfully merging this pull request may close these issues.

2 participants