[Discuss] A question for the gurus and a CMake followup

Adam Parkin pzelnip at gmail.com
Fri Mar 2 16:20:24 PST 2007


This message is twofold, although both topics are related to one another.

The first part is I wanted to comment briefly on the CMake 
cross-platform makefile generator that Alan Irwin mentioned previously 
(in the thread with the subject "Essentially all free apps will soon be 
available on Windows").

I will echo Alan's sentiments that CMake is an *excellent* tool that all 
software engineers (particularly those who use the autoconf style tools) 
should check out.  It is remarkably easy to set up an application to 
build some libraries and executables based upon those libraries.  The 
docs for CMake are somewhat weak, but for my purposes the "Hello World" 
example pretty well illustrated everything I needed to know.  Very 
highly recommended.

Now, the second part of my message is a question for the command-line 
gurus.  One of the things I don't like about CMake is that it generates 
a fair bit of clutter in every directory in your source tree.  For each 
directory it adds:

- a file called CMakeCache.txt
- a directory called CMakeFiles
- a Makefile
- a file called cmake_install.cmake

It would be nice to be able to execute a single command which deletes 
all this extra clutter so that one can get back to a "clean" source 
tree.  Right now I do this by writing a script which just changes to 
each directory in the source tree, and deletes the appropriate 
files/dirs mentioned above.  The downside to this is that everytime I 
add a new directory to the tree, I have to modify this script.

So my question (finally): is there a single command I could use which 
will delete the aforementioned files and directories from the current 
directory *and all subdirectories*?

Thanks in advance,
-- 
--
Adam Parkin
E-mail: pzelnip at gmail.com
Blog: http://www.gamertagblog.com/blog/333
----------------------
If one man offers you democracy and another offers you a bag of grain, 
at what stage of starvation will you prefer the grain to the vote?

	-- Bertrand Russell


More information about the Discuss mailing list