[Dune-devel] ALUGrid with CMake brings in zlib dependency

Markus Blatt markus at dr-blatt.de
Tue Nov 25 10:36:46 CET 2014


Hi,

On Tue, Nov 25, 2014 at 08:15:02AM +0100, Christoph GrĂ¼ninger wrote:
> Hi,
> when I have dune-alugrid with CMake, I get linker errors because zlib is
> missing. This happens for a target, where I don't use ALUGrid at all.
> The quick workaround is to add the zlib library manually to my target
> groundwater with
> target_link_libraries(groundwater ${ZLIB_LIBRARIES})
> 
> What is the right way to fix this?
> (a) Do not include libdunealugrid to the variable ${DUNE_LIBS}? Then we
> had to add the library in the add_dune_alugrid_flags function where we
> could conditionally add the zlib, too.
> (b) Add zlib, if found, to ${DUNE_LIBS} when we add libdunealugrid.
> 
> I would prefer (a) as it reduces the linker time when we do not use
> ALUGrid. 

Can you back this up with some number for a fully optimized build?
(time should be for compilation and linking with and without alugrid)

> But it contradict the idea of ${DUNE_LIBS} which should contain
> all Dune library already built.

My longterm goal was to lower the barrier for users. Currently adding
all those flags manually is cumbersome and not even
transparent. Therefore I would really like to keep it as simple as
possible for users. Even if this means always activating all the
dependencies that were found.

Markus



> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel


-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20141125/4efb8bcf/attachment.sig>


More information about the Dune-devel mailing list