[Dune] Dune and CMake

Jö Fahlke jorrit at jorrit.de
Mon Feb 15 18:48:18 CET 2010


Am Mon, 15. Feb 2010, 18:26:08 +0100 schrieb Franz Rammerstorfer:
> Hi everyone! I'm a newbie in dune, and I've unfortunately no
> experience with the GNU AutoTools.  Up to now I've always used
> CMake, and I pretty much like it.  So I've built DUNE as it's
> described in the installation notes, e.g.  dune-common, dune-grid
> and the external lib alugrid - without problems. Afterwards I linked
> the libs
> .../dune-install-dir/lib/libdunecommon.a
> .../dune-install-dir/lib/libdunegrid.a
> .../alu-install-dir/lib/libalugrid.a

I'm assuming that the libraries appear in the order given above on the linker
command line.  Since dune-grid depends on dune-common, dune-grid has to come
before dune-common on the likers command line.

> to my project, using CMake. Some functionality like 'SGrid' or
> 'FieldVector' is
> working, but nothing which belongs to alugrid.

A working SGrid does not count as an indication for correct library ordering,
since it is templates only and does not use the library, I believe.  Similar
for FieldVector.

If you want to check whether linking against dune-common works, use the debug
streams (end of dune-common/m4/dune_common.m4 should give a hint).

If you want to check whether linking against dune-grid works, use the OneDGrid
(end of dune-grid/m4/dune_grid.m4 should give a hint).

If these hints are not sufficient, we're going to need more info, like what
exactly failed (linker command lines, error messages, etc.).

> Does anybody use CMake too, to link dune with his own code? Maybe
> someone has written a FindDune.cmake script with the right
> libs. Is it possible to build Dune itself with CMake?

Bernd Flemisch wanted to do some work in that direction, I believe.  

Jö.

-- 
The irony is that Bill Gates claims to be making a stable operating
system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100215/6b52423d/attachment.sig>


More information about the Dune mailing list