[Dune] dune & cmake

Christoph GrĂ¼ninger christoph.grueninger at iws.uni-stuttgart.de
Tue Apr 12 07:05:54 CEST 2016


Hi Martin,
thanks for sharing your thoughts.
The LINK_INTERFACE_LIBRARIES stuff was introduced in 2.8.12 (?) and we
supported CMake 2.8.6 in Dune 2.4. Since then nobody took the time to
update our linking mechanism. This will become better.

> @cmake experts: I think the config.h include could be omitted if the
> ***config.cmake files set appropriate defines. Something like "moving
> the config.h.cmake into the ***config.cmake file". Any ideas?

What's your problem with the config.h? That the canonical way to pass
configure results. Why should someone want to hide that and make it less
discoverable?

> @dune devs:
> For the above approach to work, i had to do two modifications on my
> dune***targets.cmake files
> #1 i had to add "gfortran" to IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG
> for dune-common. otherwise i got undefined references from liblapack.so
> #2 i had to add "dunegrid" to INTERFACE_LINK_LIBRARIES for dune-alugrid.
> otherwise cmake did not pull in the dependencies of dune-alugrid's
> upstream modules.
> If this is a bug (which i think it is, since otherwise everything worked
> really well) i can submit an issue to gitlab.

See above.

Bye
Christoph

-- 
The method has been developed for use on a high-speed electronic
computer and would be impractical for hand-solution purposes.
                                           [Harlow & Welch 1965]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160412/74ccb519/attachment.sig>


More information about the Dune mailing list