-
Notifications
You must be signed in to change notification settings - Fork 10
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
Optional dynamic linking #30
Conversation
Wouldn't it be better to use the standard BUILD_SHARE_LIBS option and let the user configure it, as it is done in fiat? |
Good point! It is better to have shared/static linking as a configurable option, I'll do that. |
Or even better than forcing it one way, maybe stopping cmake and showing a message explaining that some options conflicts. It might save time the day someone will try to build a shared version and will only get a static version. |
Thanks for all the feedback. I think we should keep the default behaviour of switching to static linking if openacc is enabled; a lot of our build configs automatically switch to static libs if openacc is enabled and field_api should conform to that expectation. However if somebody explicitly requests a shared lib via |
Hi,
|
Thanks a lot for the feedback @dareg. ecbuild options can be toggled by appending |
But isn't BUILD_SHARED_LIBS a 'standard' ecbuild option available for any projects? I don't think you need to redefine it. |
Long story short: if we want to use the variable |
I propose that we could do it this way: dareg@2021348 |
Makes a lot of sense! I'll amend my PR accordingly. |
If openacc is disabled, then we are not limited by the
!$acc declare create
statements in field_RANKSUFF_access_module and we can link libfield_api statically. This PR adds this functionality.