<div dir="ltr">OK, upon more careful reading of the documentation for FindMPI, and realizing that I am using  CMake 3.6 not 3.7 I have adjusted my approach to be consistent with the documentation and your suggestions. I don't know if the documentation actually needs expanding upon... I think I just failed to fully comprehend it.<div><br></div><div>As far as enhancements to FindMPI go, It might be worthwhile to check if FC, CC,CXX match any obvious MPI wrappers, and then set MPI_<lang>_compiler and select the MPI version from there: If the user set the compiler explicitly to an MPI wrapper, that's likely the MPI they intend to use.... If I find some time maybe I'll work up a pull request for this.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 28, 2016 at 10:22 AM Chuck Atkins <<a href="mailto:chuck.atkins@kitware.com">chuck.atkins@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Hi Zaak,<br class="gmail_msg"><br class="gmail_msg">Sorry for the first mail being so abrupt, I didn't mean to hit "send" so soon.<br class="gmail_msg"><br class="gmail_msg"> <br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">I took a look at the FindMPI CMake module, and it seems as though you can set MPI_HOME to a list of directories to search.</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">That's also another way of doing it, which would probably be easier than what I iniitially suggested; the former has just become my own habbit since MPI_HOME isn't always set.  MPI_HOME is used as a hint to search for mpiexec.  If mpiexec is found, it then uses it's location as a basis for locating the compiler wrappers.<br class="gmail_msg"><br class="gmail_msg">That being said, if using MPI through an environment module (as is the typical use case) then FindMPI should "just work" as the wrappers generally end up in the path when the appropriate MPI module is loaded.  If you need to point to an entirely external MPI not part of your environment at all though, then using the MPI_HOME env var or MPI_<lang>_COMPILER CMake vars is the way to do it.<br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"></div><div class="gmail_msg">Would KitWare accept a pull request or a patch that expands the documentation of FindMPI</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Of course :-).  Expanding the "Usage" section in FindMPI to include using the MPI_HOME environment variable would be a good place for that.<br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"> and/or adds some clearer additional features to the call signature (like HINTS and PATHS)?</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Could you clarify what you mean by this?  To which call signature?<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg">- Chuck<br class="gmail_msg"></div></div></blockquote></div>