[Trilinos-Users] does an "official" FindTrilinos.cmake exist? (Trilinos-Users Digest, Vol 72, Issue 11)

Perschbacher, Brent M bmpersc at sandia.gov
Tue Aug 30 14:33:29 MDT 2011


Riccardo,
  Trilinos does support the find_package call in cmake. Instead of relying
on a FindTrilinos.cmake file though when you configure/build/install
Trilinos there will be a TrilinosConfig.cmake file created(and installed
with Trilinos) that find_package will use to determine whether it found
Trilinos. 

As for good, well I'd like to think it is, but I'm sure there is room for
improvement. There is some documentation for using find_package inside of
your project at:

http://trilinos.sandia.gov/Finding_Trilinos.txt

There is also an example of a project that uses find_package(Trilinos ...)
in Trilinos/demos/buildAgainstTrilinos which is a good example of how to use
all the variables that will be defined.

If you have any questions or suggestions about using find_package for
Trilinos please let me know.

Brent




On 8/30/11 1:55 PM, "Mark Hoemmen" <mhoemme at sandia.gov> wrote:

> On Aug 30, 2011, at 12:00 PM, <trilinos-users-request at software.sandia.gov>
> wrote:
>> Message: 1
>> Date: Mon, 29 Aug 2011 20:19:04 +0200
>> From: rrossi at cimne.upc.edu
>> Subject: [Trilinos-Users] does an "official" FindTrilinos.cmake exist?
>> To: trilinos-users at software.sandia.gov
>> Message-ID: <989fe89c21caa20110809b3b6686117d at cimne.upc.edu>
>> Content-Type: text/plain; charset="utf-8"
>> 
>> Dear list, 
>> 
>> i am migrating to cmake, and was hoping to have find
>> a good quality FindTrilinos.cmake.
>> 
>> any link could be very helpful
>> (admittedly i have very limited knowledge of cmake)
>> 
>> thanks in advance
>> 
>> Riccardo 
> 
> I'm not quite sure what you mean by a "good quality" FindTrilinos.cmake.  I am
> using vanilla CMake 2.8.4 on my machine, and the following line works fine in
> my applications that use Trilinos:
> 
> FIND_PACKAGE(Trilinos PATHS ${TRILINOS_PATH}/lib/cmake/Trilinos
> ${TRILINOS_PATH})
> 
> where I set TRILINOS_PATH manually to the place I installed Trilinos.  This
> sets a whole bunch of variables, like Trilinos_FOUND, Trilinos_CXX_COMPILER,
> etc.
> 
> Is this helpful?
> mfh
> 
>  
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list