<div dir="ltr"><div>Pass the following CMake options at configure time:<br><br></div>-DMPI_C_COMPILER=/path/to/mpicc<br>-DMPI_CXX_COMPILER=/path/to/mpiCC<br>-DMPI_Fortran_COMPILER=/path/to/mpif90<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">----------<br>Chuck Atkins<br>Staff R&D Engineer, Scientific Computing<br>Kitware, Inc.<br><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Nov 23, 2016 at 6:05 PM, Zaak Beekman <span dir="ltr"><<a href="mailto:zbeekman@gmail.com" target="_blank">zbeekman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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><br></div><div>Whats the correct way to pass HINTS or PATHS to FindMPI? i.e., how do I specify additional locations to search?</div><div><br></div><div>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><br></div><div>It would be great if FindMPI used the realpath of mpif90 etc when passed as $FC.</div><div><br></div><div>TIA</div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br></div></div>