-
Notifications
You must be signed in to change notification settings - Fork 34
Allow turning shared library building off #763
Allow turning shared library building off #763
Conversation
It does not make sense to check if(A) ... elseif(A) ... endif() so let's change the elseif to an else.
In af72afb (Generate static library and fix compilation definitions (tango-controls#17) (tango-controls#437), 2018-05-15) support was added for building a static library next to the dynamic one. As most users want to have only either library we use the newly introduced option BUILD_SHARED_LIBS to build either one. This also solves issues when cross-compiling where you might not have shared libraries for the target architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
e0d0d60
to
74bbee3
Compare
@mliszcz Thanks for the review. I had to unforunately fix the PR as the tests were correctly not passing. |
@t-b, as you mentioned yesterday in the Kernel meeting, after the merge of this PR, only the shared library or the static library will be built, no longer both together. |
I don't think you really need two different builds, but yes something like that needs to be done. If that is not what we want, |
Hi @t-b may I suggest the opposite? We always build the shared lib and only build the static library if BUILD_STATIC_LIB is defined? Based on the assumption most of the users just need the shared libs... that's our case, at least. |
This would break @JeanLucPons use case as he requested in #740 (comment):
So I think the ability to choose one of them is key to flexibility. |
Agreed. So, do wee need two defines, e.g. BUILD_STATIC_LIB and BUILD_SHARED_LIB, at least one mandatory? |
My proposal is to have |
This means that you either build the static or the shared lib. Fine with me. Which the default will be? |
Yes, default will be shared. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Just a small suggestion to improve a test in a bash script (Could be done in another PR because I think there are some other locations having similar code)
No description provided.