<div class="gmail_quote">On Wed, Oct 6, 2010 at 2:10 PM,  <span dir="ltr">&lt;<a href="mailto:aaron.meadows@thomsonreuters.com">aaron.meadows@thomsonreuters.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">












<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><b><font size="2" color="gray" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:gray;font-weight:bold">Hi all.</span></font></b></p>

<p class="MsoNormal"><b><font size="2" color="gray" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:gray;font-weight:bold"> </span></font></b></p>

<p class="MsoNormal"><b><font size="2" color="gray" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:gray;font-weight:bold">Is there
a good way to disallow in-source builds?  Ideally, I’d like to prevent it
before any cruft is written into the source tree.  I experimented with writing
a function into my CMakelists file and calling it.  The function checked if
CMAKE_BINARY_DIR was equal to CMAKE_SOURCE_DIR and messaged a FATAL_ERROR if
that was the case.  This works ok, but still generates a CMakeFiles directory
and a CMakeCache.txt file.</span></font></b></p></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal"><b><font size="2" color="gray" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:gray;font-weight:bold"> </span></font></b><b><font size="2" color="gray" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:gray;font-weight:bold">The
second half of the question is of course, is there an easy way to clean out a
source tree if an in-source build was accidentally kicked off?  (short of
dividing the files by their timestamp and removing the newer ones, etc..)</span></font></b></p></div></div></blockquote><div><br></div><div><div>CMake doesn&#39;t have a command to clean up after itself which seems to be what you&#39;re asking for (it would help for both use-cases you specify).  This is kind of related to my ticket asking for a distclean target, so I&#39;ll just throw it out there in case anyone has some free time on their hands.</div>
<div><br></div><div><a href="http://www.cmake.org/Bug/view.php?id=6647">http://www.cmake.org/Bug/view.php?id=6647</a></div></div><div><br></div></div>-- <br>Philip Lowman<br>