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

set 'CMAKE_POSITION_INDEPENDENT_CODE ON' for shared lib #334

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

MuellerSeb
Copy link
Contributor

Solving: geospace-code/nc4fortran#4

-fPIC was only set for APPLE or when using GNUCC compiler. In my case I ran into a linker error with Intel oneAPI on Ubuntu.

I don't know if setting CMAKE_POSITION_INDEPENDENT_CODE ON is to much, since I guess it will also affect the fortran tragets, so we could also only set the POSITION_INDEPENDENT_CODE property for the netcdff_c target.

This could also solve #35

@CLAassistant
Copy link

CLAassistant commented Mar 8, 2022

CLA assistant check
All committers have signed the CLA.

@WardF
Copy link
Member

WardF commented Mar 9, 2022

Thank you, this is almost certainly the more correct way to do this!

@WardF WardF merged commit bda0cec into Unidata:main Mar 10, 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.

3 participants