cmake clean problem

William A. Hoffman billlist at nycap.rr.com
Thu Mar 2 03:28:47 CET 2006


At 07:19 PM 3/1/2006, Ralf Habacker wrote:
>William A. Hoffman schrieb:
>> At 09:45 AM 3/1/2006, Brad King wrote:
>>   
>I saw a directory CMakeFiles/kio.dir containing all the intermediate files.
>
>Wouldn't reduce delete all *.obj (or whatever objectfile extension is 
>used) in one command the command line size very much without the effort 
>to write an additional command file ? For mingw and kio dir this command 
>would be del /Q /F CMakeFiles/kio.dir/*.obj

Then it might remove files that are not part of the build.  Someone
could create a .obj file by hand or copy some other file.  Wildcards for
removing during clean can be dangerous.  Also, it is easier to use the
same command in all makefiles, unix, nmake, mingw, so we use cmake
to remove the files, a command we know will be the same and we can control.
For example, lets say del had some sort of limit on the number of files,
we would be stuck.  However, now all we need to do is change cmake to
read the list of things to clean from a file, and it should work the same
on all platforms.



>>
>> For now, I would recommend out of source builds, and rm -rf *.
>>   
>which works only on unix or cygwin, not mingw, see above

Sure, I guess I was saying "rm -rf *" in the generic sense.
You could use explorer, del, rm, or any number of tools to remove
the entire build tree.  As long as you do an out of source build,
you can clean the build tree, and re-run cmake with little effort.

-Bill




More information about the Kde-buildsystem mailing list