[CMake] Fortran version of FindMPI

Moreland, Kenneth kmorel at sandia.gov
Tue Jan 12 11:05:42 EST 2010


I think that's a fine idea, but I will leave it to whomever maintains the Module in CMake.

-Ken


On 1/12/10 12:55 AM, "Michael Wild" <themiwi at gmail.com> wrote:



On 11. Jan, 2010, at 22:26 , Moreland, Kenneth wrote:

> I have a simple Fortran program that uses MPI that I am trying to configure with CMake.  The problem is that although the FindMPI module finds the C libraries for MPI, it does not find the Fortran libraries.  To get around this I copied the FindMPI.cmake from the CMake distribution and did some edits and a few search-and-replaces to find the Fortran version of the library.  It seems to work well enough on my system (using OpenMPI) with the exception of finding some system 64-bit libraries (which is actually caused by a CMake bug that I just submitted a report for http://www.paraview.org/Bug/view.php?id=10119).  The module is attached.  Is there any interest in placing this with the CMake distribution or integrating into the existing FindMPI module?
>
> -Ken
>

Hi Ken

Wouldn't this be a good case to use COMPONENTS? E.g. find_package(MPI COMPONENTS C) or find_package(MPI COMPONENTS Fortran). If nothing is specified, the default could be to look at global ENABLED_LANGUAGES property and go on from there and discover all components that are listed in there (i.e. C, CXX or Fortran).


Michael





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100112/dca10bbf/attachment.htm>


More information about the CMake mailing list