Skip to content

Default values of CMake options are confusing #596

@ajaust

Description

@ajaust

Hi,

I had some students compiling preCICE today and we ran into some problems. This came from the fact that the students had not specified -DBUILD_SHARED_LIBS=ON when running CMake. I was not of aware that this could be a problem as I have set this flag in a script that I use for compiling preCICE so I had forgotten about that.

At the same time, optional dependencies have there flags set to ON (PETSc, Python and MPI). Should it not rather be the other way around: Sane standard settings that lead to a reasonable build and optional settings should be turned on by the users if they need them? The option CMAKE_BUILD_TYPE only allows for three options, but none of them is specified as default?

Regarding BUILD_SHARED_LIBS the wiki in says several times that one should create the shared libraries and that the static library is even unsupported. From my experience today is also that the static library does not work well (or at all?!). Is there a reason why BUILD_SHARED_LIBS is not set to ON by default? If it is not possible to set it to ON by default I would suggest that the parts about recommending the shared library a bit more visible by making it bold or so.

Parts of this issue have been part of #283, but nothing was changed.

Best,
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions