<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/4 Daniele E. Domenichelli <span dir="ltr">&lt;<a href="mailto:daniele.domenichelli@gmail.com" target="_blank">daniele.domenichelli@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<div><br>
On 04/04/13 11:40, Ansis Māliņš wrote:<br>
&gt;&gt; Is it possible to ask CMake to make another &quot;make clean&quot; target<br>
&gt;&gt; that clears *all* the CMake generated files including the cache? I<br>
&gt;&gt; am a bit annoyed that the only way to clear everything is to<br>
&gt;&gt; basically run &quot;rm -rf *&quot;.<br>
&gt;<br>
</div><div>&gt; What would be the benefit of such a command besides syntax?<br>
<br>
<br>
</div>I also find that such a command would be useful. It could be something<br>
like the &quot;make maintainer-clean&quot; target generated by autotools.<br>
<br>
One benefit is that it would allow to easily remove all cmake files when<br>
you wrongly run cmake in the source directory instead of in the build one.<br></blockquote><div> <br></div><div>CMake cannot currently do that and it does not seem wise<br>to ask for that feature.<br>You may search the mailing list for this discussion topic and you&#39;ll find <br>
many answers.<br>
<br></div><div>The only [reasonable] option is to do out-of-source build,<br></div><div>then you know for sure that you can throw away the build tree.<br><br></div><div>Safely avoiding accidental in-source build is a feature request:<br>
</div></div><a href="http://public.kitware.com/Bug/view.php?id=6672">http://public.kitware.com/Bug/view.php?id=6672</a><br><br></div><div class="gmail_extra">Another option which is unrelated to CMake in order to clean-up a source tree<br>
is to use a VCS which may be able to remove any non versioned file easily.<br></div><div class="gmail_extra">(see e.g. git clean)<br></div><div class="gmail_extra"><br>-- <br>Erk<br>Le gouvernement représentatif n&#39;est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</div></div>