Skip to content

Using stdlib in meson #287

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

Closed
awvwgk opened this issue Jan 5, 2021 · 3 comments
Closed

Using stdlib in meson #287

awvwgk opened this issue Jan 5, 2021 · 3 comments

Comments

@awvwgk
Copy link
Member

awvwgk commented Jan 5, 2021

Using stdlib is currently only possible with CMake by inclusion as subproject or by systemwide installation (either /usr or /usr/local prefix). The first approach excludes certain CMake setups and other build systems like meson, while the latter is not acceptable in case several compilers are used for development.

An usual approach to install packages in a local prefix is exporting CMake package files or pkg-config files, the latter makes the project discoverable by most non-CMake build systems.

Are there plans in the short-term to allow exporting of package files to make stdlib accessible for other projects?

@milancurcic
Copy link
Member

I don't know of any plans for this. I'm not too familiar with pkg-config files so I don't use them regularly. It would be helpful for people who use them to post here and express that this is a desired feature. But even if it's useful for only you, I'd say just go ahead because something like this increases ease of use without adding complexity for the end-user.

@ivan-pi
Copy link
Member

ivan-pi commented Jan 6, 2021

I used pkg-config recently to link with the Intel MKL libraries and found it easy enough to use. Essentially, using pkg-config requires writing a small file with some meta-data about the project, the required link flags and include folders of the library.

One downside in case of Fortran is that the link flags might be compiler specific (in C this is less of a problem as icc borrows the gcc front-end). Intel MKL offers a "link line advisor" tool which helps generate the right flags that can be pasted into a pkg-config file (ideally you only do this once upon installation). The GNU Scientific library (and also it's Fortran wrapper FSGL) offer pkg-config files, meaning some potential users will be familiar with this already.

@awvwgk
Copy link
Member Author

awvwgk commented Feb 10, 2021

This is working now just fine with meson. Therefore I will close this issue as resolved.

@awvwgk awvwgk closed this as completed Feb 10, 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

3 participants