2013/4/4 Daniele E. Domenichelli <[email protected]> > 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
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
