[cmake-developers] Adding Microsoft MPI Fortran support in FindMPI
Christian Pfeiffer
cpfeiffer at live.de
Wed Apr 26 17:45:36 EDT 2017
I reckon it might be better to ignore the Fortran 90 module API for now.
Adding a function for that would mean that the linked target has to be
visible everywhere where the MPI package is being used with Fortran. Not
to mention that all projects using the F90 module API then would need to
have extra code for supporting MSMPI, significantly limiting its usefulness.
Originally, I thought the mpi.f90 file just defined the MPI modules, but
there's a few COMMON blocks that will end up as dllimport symbols and
therefore need linking with the result, instead of it sufficing to just
add some include directories after creating the .mod file.
Adding the Fortran 77 API isn't a problem at all on the other hand, so I
would be leaving it at that for the time being. In case a user
absolutely needs Fortran 90 support on MSMPI, they'd have to compile the
file in advance, add it to the includes and the Fortran libraries.
That's not too much trouble and imho a better way than adding a
requirement for project code which then would need to be maintained in
future versions, too.
- Chris
On 4/24/2017 3:06 PM, Brad King wrote:
> On 04/21/2017 05:45 PM, Christian P. wrote:
>> Is this a good/bad idea or is there any way to do this in a proper fashion?
>> The idea of adding an actual target to a Find module seems wrong to me,
>> but I’m not seeing any way of doing it otherwise.
> I think we'll have to expose this requirement to project code. Provide
> a function the project can call to make the needed target available. That
> way the project can control if/when it is done and what the target is
> called.
>
> -Brad
>
More information about the cmake-developers
mailing list