Skip to content

Build is unsupported by default #801

@fsimonis

Description

@fsimonis

Please describe the problem you are trying to solve.
When configuring preCICE, the resulting library will be static by default.
We currently do not support using preCICE as a static library as both the CMake config and the pkg-config files do not support the static library. ( The current CMake config is missing depending targets)

Thus our build system is unsupported by default.

Describe the solution you propose.

There are many solutions to this problem (ranked by workload):

  1. Always build a shared library and forget about static libraries altogether.
    This obviously prevents to use preCICE as a static library, which is unreasonable.
  2. Set BUILD_SHARED_LIBS to ON if not explicitly specified. PR: Set BUILD_SHARED_LIBS to True by default #796
    This will change a CMake default and may surprise users. This could be regarded as a breaking change.
  3. Always build both shared and static libraries and only directly support the shared case.
    Requires to build preCICE internally as an object library first to prevent recompilation. This is required for hidden symbol visibility, so we should do it at some point anyhow.
  4. Extend the CMake script to fully support static libraries.
    This requires to export some internal dependencies and requires to propagate the dependencies to the dependant.

Additional context

Metadata

Metadata

Assignees

Labels

bugpreCICE does not behave the way we want and we should look into it (and fix it if possible)usabilityThis issue will make preCICE easier for non-expert users

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions