I&#39;d recommend this:<br>touch CMakeCache.txt<br>touch CMakeFiles<br><br>Check said files into your revision control system.<br><br>The fact that it can&#39;t create a directory alone makes cmake freak out almost immediately.<br>
<br>Juan<br><br><div class="gmail_quote">On Fri, Nov 26, 2010 at 3:06 PM, Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2010/11/26 Wylie, Brian &lt;<a href="mailto:bnwylie@sandia.gov">bnwylie@sandia.gov</a>&gt;:<br>
<div class="im">&gt; Hi All,<br>
&gt;<br>
&gt; I want to force an &#39;out-of-source&#39; build for a small project that I converted to use Cmake.<br>
&gt;<br>
&gt; I did a bit of searching and found variants of the following...<br>
&gt;<br>
&gt; # Make sure the build is out of source<br>
&gt; STRING(COMPARE EQUAL &quot;${CMAKE_SOURCE_DIR}&quot; &quot;${CMAKE_BINARY_DIR}&quot; insource)<br>
&gt;  IF(insource)<br>
&gt;    MESSAGE(FATAL_ERROR &quot;Do not build in your source dir please :)&quot;)<br>
&gt;  ENDIF(insource)<br>
&gt;<br>
&gt;<br>
&gt; It works but it still generates a CMakeCache.txt file and a CMakeFiles directory in the source directory (which I&#39;ve also seen others discussing)...  is there a more official way to block &#39;in-source&#39; builds that leaves the source dir pristine?<br>

<br>
</div>There is a feature request pending for this (with one duplicate)<br>
<a href="http://www.vtk.org/Bug/view.php?id=6672" target="_blank">http://www.vtk.org/Bug/view.php?id=6672</a><br>
<font color="#888888"><br>
--<br>
Erk<br>
Membre de l&#39;April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">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" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>