<div dir="ltr">Chuck, thanks for the response!<div><br></div><div>The issue with your technique is that I don't want to put the burden on the users...</div><div><br></div><div>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><br></div><div>Would KitWare accept a pull request or a patch that expands the documentation of FindMPI and/or adds some clearer additional features to the call signature (like HINTS and PATHS)?</div><div><br></div><div>Thanks,</div><div>-Zaak<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 28, 2016 at 9:58 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_msg">Pass the following CMake options at configure time:<br class="gmail_msg"><br class="gmail_msg"></div>-DMPI_C_COMPILER=/path/to/mpicc<br class="gmail_msg">-DMPI_CXX_COMPILER=/path/to/mpiCC<br class="gmail_msg">-DMPI_Fortran_COMPILER=/path/to/mpif90<br class="gmail_msg"><div class="gmail_extra gmail_msg"><br clear="all" class="gmail_msg"><div class="gmail_msg"><div class="m_-5847897050219374051gmail_signature gmail_msg" data-smartmail="gmail_signature"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">----------<br class="gmail_msg">Chuck Atkins<br class="gmail_msg">Staff R&D Engineer, Scientific Computing<br class="gmail_msg">Kitware, Inc.<br class="gmail_msg"><br class="gmail_msg"></div></div></div></div></div></div></div>
<br class="gmail_msg"><div class="gmail_quote gmail_msg"></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Wed, Nov 23, 2016 at 6:05 PM, Zaak Beekman <span dir="ltr" class="gmail_msg"><<a href="mailto:zbeekman@gmail.com" class="gmail_msg" target="_blank">zbeekman@gmail.com</a>></span> wrote:<br class="gmail_msg"></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">Hi,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I want to be able to pass FC=mpif90 (or FC=$(which mpif90)) and CC=mpicc etc. OR also be able to pass a compiler and use FindMPI to add link, compile and include flags. I'm encountering an issue when my MPI implementation is not on my PATH, I want CMake to be able to look in an additional location (our build script can download and build MPICH and by default installs it in user space) and also resolve where mpif90 is coming from and look there too.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Whats the correct way to pass HINTS or PATHS to FindMPI? i.e., how do I specify additional locations to search?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Using `find_package` with HINTS and PATHS means that it doesn't use FindMPI. I also tried setting CMAKE_SYSTEM PREFIX_PATH, but I think that's a cache variable set early, so it's not having an effect.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It would be great if FindMPI used the realpath of mpif90 etc when passed as $FC.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">TIA</div></div>
<br class="gmail_msg"></blockquote></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">--<br class="gmail_msg">
<br class="gmail_msg">
Powered by <a href="http://www.kitware.com" rel="noreferrer" class="gmail_msg" target="_blank">www.kitware.com</a><br class="gmail_msg">
<br class="gmail_msg">
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" class="gmail_msg" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br class="gmail_msg">
<br class="gmail_msg">
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br class="gmail_msg">
<br class="gmail_msg">
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" class="gmail_msg" target="_blank">http://cmake.org/cmake/help/support.html</a><br class="gmail_msg">
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" class="gmail_msg" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br class="gmail_msg">
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" class="gmail_msg" target="_blank">http://cmake.org/cmake/help/training.html</a><br class="gmail_msg">
<br class="gmail_msg">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br class="gmail_msg">
<br class="gmail_msg">
Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div></div>
</blockquote></div></div></div>