[Cmake] Recursive cleaning...
Brad King
brad . king at kitware . com
Wed, 10 Sep 2003 09:35:57 -0400 (EDT)
> I've found in the archives how to remove CMake generated files
I assume you're referring to this:
http://www . cmake . org/pipermail/cmake/2003-June/003953 . html
> but i'm unable to make it more general in order to process each subdir
> and make it installing and execute the new target distclean.
[snip]
> i would like "make distclean" able to remove CMake generated files not
> only in root directory but in each subdir
There are several answers. Choose whichever you like:
1.) CMake does not support distclean. See this FAQ entry:
http://www . cmake . org/cgi-bin/cmakefaq . cgi?req=show&file=faq05 . 006 . htp
Out-of-source builds are strongly encouraged. Once one tries them, one
never goes back.
2.) Only the makefile generators (not project file generators) have a
notion of a "subdirectory" in the build tree. This notion is not
accessible from CMakeList.txt files for creating targets that
invoke make in a subdirectory.
3.) You can probably use the technique in the archive message referenced
above, but instead of using rm, run a shell script of your own that
uses a find command to traverse the tree and remove the files. This
will work in UNIX-like environments.
-Brad