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

Use pkg-config to detect flags #5

Closed
fsimonis opened this issue Dec 3, 2019 · 5 comments
Closed

Use pkg-config to detect flags #5

fsimonis opened this issue Dec 3, 2019 · 5 comments
Assignees

Comments

@fsimonis
Copy link
Member

fsimonis commented Dec 3, 2019

It may be worth looking into the pkgconfig package.

We could use this to extract the necessary compiler flags for preCICE.

@fsimonis fsimonis changed the title pkg-config for detection of flags Use pkg-config to detect flags Dec 3, 2019
@BenjaminRodenberg
Copy link
Member

As far as I understand this issue only the following flags might be provided through pkgconfig:

link_args.append("-lprecice")

The remaining flags have been removed in #36 when we removed MPI. @fsimonis am overseeing something? Do you think that replacing -lprecice is worth dealing with pkgconfig?

@BenjaminRodenberg BenjaminRodenberg self-assigned this Feb 13, 2020
@MakisH
Copy link
Member

MakisH commented Feb 13, 2020

Important note here: pkg-config also returns more than that: it also returns the include path and the library path (apart from the library name). It can be e.g. something like -I/usr/local/include -L/usr/local/lib -lprecice.

In your case it probably skips the paths because they are system paths. But it is a very handy tool if you have your dependencies in non-system directories. You just need to make pkg-config aware of the existence of your dependency (e.g. adding the path to the libprecice.pc file into the PKG_CONFIG_PATH).

@BenjaminRodenberg
Copy link
Member

Thanks for the info! Sounds like good arguments for keeping this issue open. I will look into it.

BenjaminRodenberg added a commit that referenced this issue Oct 21, 2021
@BenjaminRodenberg
Copy link
Member

Picking up this issue, because I stumbled over it when trying to build the bindings on top of our spack baseimage. pkg-config helped me to determine the right paths, if preCICE was installed with spack and the bindings were installed from source by checking out this repository. Will try to quickly prepare a PR.

@IshaanDesai
Copy link
Member

Closed via #149

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 a pull request may close this issue.

4 participants