[Dune] alugrid+ug with cmake

Carsten Gräser graeser at mi.fu-berlin.de
Fri May 9 10:44:37 CEST 2014


Hi Christoph,
thanks a lot for your comments.

Am 09.05.2014 09:42, schrieb Christoph GrĂ¼ninger:
> Hi Carsten,
> I checked the CMake configure tests again. It turned out that extra
> spaced in the CMAKE_PREFIX_PATH caused the error for me. Especially
> the spaces before \ and at the beginning of the lines like:
> 
> CMAKE_PREFIX_PATH=" \
>   blabla; \
>   bla2 \
>   "
> 
> It should be
> 
> CMAKE_PREFIX_PATH="\
> blabla;\
> bla2\
> "
This explains why it worked for me with the semicolon.

> I fixed the summary for UG.
> Please give the current master another try.
I also found out that removing QUIET fixes this at the price of
the warning if ug is not found. This seems to be the reason
why you added the QUIET flag in 25f3e04.

As far as I understand (as cmake novice) after reading
the cmake docs, the reason for the warning is that we
don't follow the cmake philosophy when testing for ug:

If we just call find_package(FOO, 3.9.1) it would normaly
invoke the MODULE-mode that calls FindFoo.cmake and will
not warn if foo is not found. If there is not FindFoo.cmake
it goes to CONFIG-mode that uses foo-config.cmake of an
_existing_ foo. Since foo-config.cmake is part of that
check it emits a warning if the latter is not found.

The clean solution seems to be to provide a FindUG.cmake
that checks for presence of ug. If ug is found this one
can use find_package(... CONFIG) do get the details from
ug-config.cmake.

Best,
Carsten


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


More information about the Dune mailing list