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

Add library-dir to support -Lpath #671

Closed
wants to merge 1 commit into from

Conversation

zoziha
Copy link
Contributor

@zoziha zoziha commented Mar 9, 2022

  • Add library-dir in fpm.toml to support -Lpath;
  • Use the compiled minpack as a demo of this new feature;
  • Update tests.

Description

-Lpath makes it possible to distribute large libraries such as stdlib, OpenBLAS, HDF5, MKL, etc., and to package compiled .mod and .a/.dll/.so/.dll.a files into fpm distribution.

@@ -37,6 +37,7 @@ subroutine default_library(self)

self%source_dir = "src"
self%include_dir = [string_t("include")]
self%library_dir = [string_t("lib")]
Copy link
Contributor Author

@zoziha zoziha Mar 9, 2022

Choose a reason for hiding this comment

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

library-dir defaults to lib.

Comment on lines +1 to +9
name = "minpack"

[library]
include-dir = ["inc"]
library-dir = ["src"]

[build]
link = "minpack"
external-modules = ["minpack_module"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These four features allow fpm to distribute binary link libraries, like minpack.

@zoziha
Copy link
Contributor Author

zoziha commented May 27, 2022

Rethinking the value of this PR, it seems that this feature does not need to be implemented. :\

Currently, we can mostly set the system or temporary FPM_FFLAGS environment variable to support -Ipath/to/include and -Lpath/to/lib.

I will close this PR tomorrow.

@zoziha zoziha closed this May 28, 2022
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.

Add -Lpath to support compiled native packages, and distribute compiled binary fpm packages
1 participant