dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #19067
Re: [Branch ~dolfin-core/dolfin/main] Rev 4955: Add Trilinos support.
On Thu, 2010-08-12 at 13:39 +0100, Garth N. Wells wrote:
> On Thu, 2010-08-12 at 14:32 +0200, Johannes Ring wrote:
> > On Thu, Aug 12, 2010 at 2:16 PM, <noreply@xxxxxxxxxxxxx> wrote:
> > > ------------------------------------------------------------
> > > revno: 4955
> > > committer: Garth N. Wells <gnw20@xxxxxxxxx>
> > > branch nick: dolfin-cmake
> > > timestamp: Thu 2010-08-12 13:15:23 +0100
> > > message:
> > > Add Trilinos support.
> > >
> > > Super easy because Trilinos provides TrilinosConfig.cmake.
> >
> > Is it common that this file is installed in a normal Trilinos
> > installation? Where is it installed?
> >
>
> It's standard from Trilinos 10.2. It's in
>
> $TRILINOS_DIR/include
>
> CGAL has one too (but it's in /usr/lib/CGAL).
>
> It seems that CMake can create this file using 'export'. Not sure how it
> works though.
>
Turns out not to br true - looks like we need to follow the same
approach used for creating the pkg-config file is we want a
DolfinConfig.cmake file.
Garth
> Garth
>
> > Johannes
> >
> > > modified:
> > > CMakeLists.txt
> > > dolfin/CMakeLists.txt
> > >
> > >
> > > --
> > > lp:dolfin
> > > https://code.launchpad.net/~dolfin-core/dolfin/main
> > >
> > > Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
> > > To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
> > >
> > > === modified file 'CMakeLists.txt'
> > > --- CMakeLists.txt 2010-08-11 22:13:42 +0000
> > > +++ CMakeLists.txt 2010-08-12 12:15:23 +0000
> > > @@ -90,6 +90,10 @@
> > > find_package(UMFPACK.dolfin)
> > > endif(DOLFIN_ENABLE_UMFPACK)
> > >
> > > +if(DOLFIN_ENABLE_TRILINOS)
> > > + find_package(Trilinos PATHS $ENV{TRILINOS_DIR}/include /usr/local/include /usr/include)
> > > +endif(DOLFIN_ENABLE_TRILINOS)
> > > +
> > > #if(DOLFIN_ENABLE_TRILINOS)
> > > # include(FindTrilinos.dolfin)
> > > #endif(DOLFIN_ENABLE_TRILINOS)
> > >
> > > === modified file 'dolfin/CMakeLists.txt'
> > > --- dolfin/CMakeLists.txt 2010-08-12 10:45:45 +0000
> > > +++ dolfin/CMakeLists.txt 2010-08-12 12:15:23 +0000
> > > @@ -89,6 +89,13 @@
> > > list(APPEND DOLFIN_INCLUDE_DIRECTORIES ${MTL4_INCLUDE_DIR})
> > > endif(DOLFIN_ENABLE_MTL4 AND MTL4_FOUND)
> > >
> > > +if(DOLFIN_ENABLE_TRILINOS AND Trilinos_FOUND)
> > > + list(APPEND DOLFIN_CXX_DEFINITIONS "-DHAS_TRILINOS")
> > > + list(APPEND DOLFIN_INCLUDE_DIRECTORIES ${Trilinos_INCLUDE_DIRS})
> > > + list(APPEND DOLFIN_TARGET_LINK_LIBRARIES_DIRS ${Trilinos_LIBRARY_DIRS})
> > > + list(APPEND DOLFIN_TARGET_LINK_LIBRARIES ${Trilinos_LIBRARIES})
> > > +endif(DOLFIN_ENABLE_TRILINOS AND Trilinos_FOUND)
> > > +
> > > if(DOLFIN_ENABLE_PETSC AND PETSC_FOUND)
> > > list(APPEND DOLFIN_CXX_DEFINITIONS "-DHAS_PETSC")
> > > list(APPEND DOLFIN_INCLUDE_DIRECTORIES ${PETSC_INCLUDES})
> > > @@ -103,6 +110,9 @@
> > >
> > > #------------------------------------------------------------------------------
> > >
> > > +# Add link directories
> > > +link_directories(${DOLFIN_TARGET_LINK_LIBRARIES_DIRS})
> > > +
> > > # Add compiler include directories
> > > include_directories(${DOLFIN_SOURCE_DIR} ${DOLFIN_INCLUDE_DIRECTORIES})
> > >
> > >
> > >
> > >
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
References