[CMake] Choosing MPI installation

Martin Vymazal martin.vymazal at vki.ac.be
Mon Apr 11 09:42:24 EDT 2011


Hello,

  I'm a beginner and I apologize in case I'm asking a question that  
has already been answered. I would like to find mpi in my  
CMakeLists.txt and enable the user to set the mpi inlude and lib  
directories by setting say variables MY_MPI_INCLUDE_DIR and  
MY_MPI_LIB_DIR in cmake gui.
   Using find_package(MPI) works just fine for me, but once the  
package is found (and the variables MPI_LIBRARY and MPI_INCLUDE_PATH  
are set and cached), I cannot force cmake to search again for MPI in a  
different directory).
   Could you please give me a hint how to do this? How should I handle  
a situation where a user has possibly multiple mpi installations?

  Thank you very much.

  Best regards,

    Martin Vymazal


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the CMake mailing list