Intel MPI on Windows under x86_64 MSYS2

Intel MPI on Windows under x86_64 MSYS2

Greetings fellow CMake users, enthusiasts, and developers!

We have a user who is installing OpenCoarrays on Windows using Intel MPI under MSYS2. They report having to generate an interface library, impi.a (or impi.lib) by hand using gendef and dlltool for Intel’s impi.dll MPI library. My questions are as follows:

Can CMake automate the generation of an interface library for an existing 3rd party windows .dll without having to call non-standard tools?

Does anyone know if they are just misconfiguring their Intel MPI and Intel really ships with an interface library somewhere that is not getting picked up by the build system? (If so, do we need anything special beyond find_package(MPI) to use the interface library that Intel may or may not ship?)

The user also reports having to edit FindMPI.cmake to get it running properly on MSYS2: