[CMake] Clearing all cmake files

Eric Noulard eric.noulard at gmail.com
Wed Sep 10 03:58:52 EDT 2008


2008/9/9 Robert Kubrick <robertkubrick at gmail.com>:
> I did not use an out of source build, so that of course would simplify
> things, but I still think that a command like:
>
> cmake erase
>
> Would be convenient to clear all cmake generated files and roll-back to the
> scenario *before* 'cmake .' Yes, I can remove files manually but the user is
> not supposed to know exactly which files cmake generates. Different versions
> might change generated files or add hidden files.

You should dig the mailing list archive.
cmake erase is not that easy to implement because using
cmake you may use

ADD_CUSTOM_COMMAND
EXECUTE_PROCESS and the like
which may run tools which actually generates outputs (files, directory etc...)
and cmake is not even aware of, only the user who write the corresponding
cmake script knows it.

And yes ADD_CUSTOM_COMMAND as an OUTPUT argument but
may be the user does not list all generated file there, may be because
he cannot guess how many file will be generated.

Having a separate source and build tree is really the best way to go,
then removing the build tree is easy :=)


-- 
Erk


More information about the CMake mailing list