I'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'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"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></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 <<a href="mailto:bnwylie@sandia.gov">bnwylie@sandia.gov</a>>:<br>
<div class="im">> Hi All,<br>
><br>
> I want to force an 'out-of-source' build for a small project that I converted to use Cmake.<br>
><br>
> I did a bit of searching and found variants of the following...<br>
><br>
> # Make sure the build is out of source<br>
> STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)<br>
> IF(insource)<br>
> MESSAGE(FATAL_ERROR "Do not build in your source dir please :)")<br>
> ENDIF(insource)<br>
><br>
><br>
> It works but it still generates a CMakeCache.txt file and a CMakeFiles directory in the source directory (which I've also seen others discussing)... is there a more official way to block 'in-source' 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'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>