Skip to content
Snippets Groups Projects
Commit 9fe22cf9 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake] Repair shared libraries for CMake < 3.0.


a) OBJECT is needed to avoid linking libdunegrid to itself.
b) Linking a library to itself will become an error in CMake 3.0.
c) Shared libraries build with OBJECT will fail for user code
   that links DUNE_LIBS but sets not the flags for the linked
   grids (e.g. in dune-localfunctions 2.3 or dune-pdelab).
   The order of libs is not correct, libdunegrid should be
   before the external grids.
d) Staying compatible with CMake 2.8.6 forces us to not
   use the linking stuff introduced by 2.8.9 and 2.8.12.
e) Maybe we can fix this in Dune's code, but not as fast
   as needed.
Due to a) - e) you cannot build shared libraries with external
grids and CMake 3.0.
Static libs do work.

(cherry picked from commit a21f4572)
Signed-off-by: default avatarChristoph Grüninger <gruenich@dune-project.org>
parent 751a6b52
Branches
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment