<p>Just remove these values from cache. If you always want to search in custom location, look at find_package's options to avoid searching in default locations</p>
<p>On Apr 11, 2011 6:03 PM, "Martin Vymazal" <<a href="mailto:martin.vymazal@vki.ac.be">martin.vymazal@vki.ac.be</a>> wrote:<br type="attribution">> Hello,<br>> <br>> I'm a beginner and I apologize in case I'm asking a question that <br>
> has already been answered. I would like to find mpi in my <br>> CMakeLists.txt and enable the user to set the mpi inlude and lib <br>> directories by setting say variables MY_MPI_INCLUDE_DIR and <br>> MY_MPI_LIB_DIR in cmake gui.<br>
> Using find_package(MPI) works just fine for me, but once the <br>> package is found (and the variables MPI_LIBRARY and MPI_INCLUDE_PATH <br>> are set and cached), I cannot force cmake to search again for MPI in a <br>
> different directory).<br>> Could you please give me a hint how to do this? How should I handle <br>> a situation where a user has possibly multiple mpi installations?<br>> <br>> Thank you very much.<br>
> <br>> Best regards,<br>> <br>> Martin Vymazal<br>> <br>> <br>> ----------------------------------------------------------------<br>> This message was sent using IMP, the Internet Messaging Program.<br>
> <br>> <br>> _______________________________________________<br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>> <br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
> <br>> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>> <br>> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></p>