Set BUILD_SHARED_LIBS to True by default#796
Set BUILD_SHARED_LIBS to True by default#796fsimonis wants to merge 2 commits intoprecice:developfrom
Conversation
|
Isn't this contradicting your previous opinion? I have a bit mixed feeling to do this in a minor release. I guess users expect that building works the same way for every minor release. |
|
Do we currectly know of any users that build a static library (on purpose)? Also, since we had already the discussion a few times, which is the standard we are sticking to? |
That's information we have never collected. I guess we don't know. At least I don't have a feeling for this at all. |
|
What we know is that we don't test the static library (in our system tests) and some adapters should not work with static out of the box. |
|
I am not religious about this. There are good reasons to make the shared lib the default, I agree. I am just a bit puzzled since we had this exact discussion before releasing v2.0 and decided the opposite way 😄 🙈
That's @fsimonis' expertise |
There was a problem hiding this comment.
The code looks good, the changelog has an entry.
I suggest that we additionally update the CI to not set explicitly enable it (since we want to monitor any changes in the behavior). Optionally also the coverage. Other than that, it is ready (re-request review).
After merging this, we should:
- Excplicitly mention this in the release notes
- (optional) Update the system tests, similarly to the CI
- Update the wiki page Building: Using CMake.
- Optionally, we could remove it from the pages for clusters, but maybe these are the users that may want to try a static library, so the hint probably does not harm.
A few arguments in favor of this PR:
- It is the behavior that we and most of our users want, so why not make it default?
- I would really like to be able to not worry about additional options that I need to set every time I build preCICE on a different system.
cmake ..should just work in most cases.
- I would really like to be able to not worry about additional options that I need to set every time I build preCICE on a different system.
- We explicitly set it as the default for XSDK, which I see as a contradiction.
Related previous discussion can be found in #596.
|
This was a bit of a snap reaction to a more in-depth problem. Let's shift it to an issue. |
List the core changes of this PR
This PR changes the default value of the option for
BUILD_SHARED_LIBStoON.Motivation
We constantly run into issues with users (and developers) running into issues with a statically build preCICE library.
Sometimes new users don't read the documentation and sometimes seasoned users simply don't remember it.
Setting the
option(toOnhas the following effects:ONwhen the user did not set anything.