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