[CMake] Run clean before automatically re-running cmake?

Abe Bachrach abachrach at gmail.com
Wed Feb 12 11:35:19 EST 2014


Hi there,

The Makefile that cmake generates includes a rule to automatically re-run
cmake if any of the input CMakelists.txt files change.

Is there a way to configure this rule to have it run clean first?


Currently, if you change the name of an executable target (or library), it
will leave the old file in the output location, and then after re-running
cmake, the Makefile will not have any record of it, so running make clean
won't remove it.

I would rather have the rule call make clean before re-running cmake so
that such stray outputs are not left around.

Is there any way to accomplish this?

Thanks!
-=Abe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140212/95234b6f/attachment.html>


More information about the CMake mailing list