Skip to content

Set BUILD_SHARED_LIBS to True by default#796

Closed
fsimonis wants to merge 2 commits intoprecice:developfrom
fsimonis:default-to-shared-build
Closed

Set BUILD_SHARED_LIBS to True by default#796
fsimonis wants to merge 2 commits intoprecice:developfrom
fsimonis:default-to-shared-build

Conversation

@fsimonis
Copy link
Copy Markdown
Member

List the core changes of this PR

This PR changes the default value of the option for BUILD_SHARED_LIBS to ON.

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( to On has the following effects:

  • It does not override the setting if is present in the CMakeCache.
  • It defaults to ON when the user did not set anything.

@fsimonis fsimonis added building Improves or extends the building or packaging of preCICE usability This issue will make preCICE easier for non-expert users labels Jul 10, 2020
@fsimonis fsimonis added this to the Version 2.1.0 milestone Jul 10, 2020
@uekerman
Copy link
Copy Markdown
Member

Isn't this contradicting your previous opinion?
"Following standards more important than being simple"

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.

@MakisH
Copy link
Copy Markdown
Member

MakisH commented Jul 10, 2020

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?

@uekerman
Copy link
Copy Markdown
Member

Do we currectly know of any users that build a static library (on purpose)?

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.

@MakisH
Copy link
Copy Markdown
Member

MakisH commented Jul 10, 2020

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.

@uekerman
Copy link
Copy Markdown
Member

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 😄 🙈

Also, since we had already the discussion a few times, which is the standard we are sticking to?

That's @fsimonis' expertise

Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
  • We explicitly set it as the default for XSDK, which I see as a contradiction.

Related previous discussion can be found in #596.

@fsimonis fsimonis marked this pull request as draft July 11, 2020 20:27
@fsimonis
Copy link
Copy Markdown
Member Author

This was a bit of a snap reaction to a more in-depth problem. Let's shift it to an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

building Improves or extends the building or packaging of preCICE usability This issue will make preCICE easier for non-expert users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants