On Aug 22 2010, Anders Logg wrote:
On Sun, Aug 22, 2010 at 12:29:30AM +0100, Garth N. Wells wrote:
On Sun, 2010-08-22 at 01:17 +0200, Anders Logg wrote:
> On Sun, Aug 22, 2010 at 01:11:50AM +0200, Anders Logg wrote:
> > On Sat, Aug 21, 2010 at 11:49:06PM +0100, Garth N. Wells wrote:
> > > On Sat, 2010-08-21 at 20:52 +0000, [email protected] wrote:
> > > > ------------------------------------------------------------
> > > > revno: 5046
> > > > committer: Anders Logg <[email protected]>
> > > > branch nick: dolfin-dev
> > > > timestamp: Sat 2010-08-21 22:45:13 +0200
> > > > message:
> > > > Add FindCGAL.cmake.dolfin for finding CGAL config. Includes
> > > > compile/run
> > > > test that passes on Lucid.
> > >
> > > I don't think that this is the right approach (plus it no longer
> > > works on my computer).
> > >
> > > CGAL uses CMake, and generates a config file with loads of build
> > > information, like libraries on which it depends. We should use the
> > > CMake config file.
> > >
> > > Garth
> >
> > It didn't work for me before and I found the CGAL CMake file
> > difficult to understand. Works fine for me now on Lucid.
>
> I take that back. It still breaks on Lucid. It also breaks on Snow
> Leopard for the same reason but in different places. On Lucid, it
> breaks when I try to build a demo and on Snow Leopard it breaks
> earlier when it links something.
>
> In both cases, the problem is missing references to mpfr (which I have
> installed).
>
> What flags should be added?
>
> Perhaps it's best to rely on ${CGAL_DIR}/CGAL/CGALConfig.cmake to get
> the variables but I don't think ${CGAL_DIR}/CGAL/FindCGAL.cmake looks
> very good.
>
I've never looked at it - I just look at CGALConfig.cmake which is easy
to follow. I guess we need to add
CGAL_3RD_PARTY_LIBRARIES_DIRS
CGAL_3RD_PARTY_LIBRARIES
Garth
I'll check again now if it works on Lucid and Snow Leopard. It didn't
work before.
If it works, how about letting FindCGAL.dolfin.cmake call
FindCGAL.cmake and fix the things that are missing:
1. Writing something (it's currently silent)
2. Compiling the test program
3. Setting correct names of the variables (according to the CMake
recommended names.
CGAL_FOUND - system has CGAL
CGAL_INCLUDE_DIRS - include directories for CGAL
CGAL_LIBRARIES - libraries for CGAL
CGAL_DEFINITIONS - compiler flags for CGAL
CGAL follows this convention. The convention covers simple cases. I suggest
making the DOLFIN CMake config file more elaborate, and separate out the
DOLFIN library and the 3rd party libaries. It gives someone building DOLFIN
more freedom if required - some system will require the 3rd party library
flags, and other won't.
I think we should do the same for Trilinos but there we can have a
very simple file that just checks for the Trilinos CMake file and
gives a less annoying (smaller) error message when that file is
missing.
If we use the QUIET option, then the output is low key. I'm keen to avoid
wrapping all config files.
Garth
--
Anders
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp