[CMake] "make superclean" target? (i.e. clear *everything*)

Eric Noulard eric.noulard at gmail.com
Thu Apr 4 09:34:19 EDT 2013


2013/4/4 Daniele E. Domenichelli <daniele.domenichelli at gmail.com>

> Hello,
>
> On 04/04/13 11:40, Ansis Māliņš wrote:
> >> Is it possible to ask CMake to make another "make clean" target
> >> that clears *all* the CMake generated files including the cache? I
> >> am a bit annoyed that the only way to clear everything is to
> >> basically run "rm -rf *".
> >
> > What would be the benefit of such a command besides syntax?
>
>
> I also find that such a command would be useful. It could be something
> like the "make maintainer-clean" target generated by autotools.
>
> One benefit is that it would allow to easily remove all cmake files when
> you wrongly run cmake in the source directory instead of in the build one.
>

CMake cannot currently do that and it does not seem wise
to ask for that feature.
You may search the mailing list for this discussion topic and you'll find
many answers.

The only [reasonable] option is to do out-of-source build,
then you know for sure that you can throw away the build tree.

Safely avoiding accidental in-source build is a feature request:
http://public.kitware.com/Bug/view.php?id=6672

Another option which is unrelated to CMake in order to clean-up a source
tree
is to use a VCS which may be able to remove any non versioned file easily.
(see e.g. git clean)

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130404/561e4734/attachment.htm>


More information about the CMake mailing list