[cmake-developers] ADDITIONAL_MAKE_CLEAN_FILES only works in Makefile generators / automoc cleaning problem

Brad King brad.king at kitware.com
Mon Apr 29 15:10:43 EDT 2013


On 04/29/2013 03:05 PM, Alexander Neundorf wrote:
> Now after some emails on the cmake list, it seems ADDITIONAL_MAKE_CLEAN_FILES 
> is used only by the Makefile-generators, but not by e.g. the VS generators ?

VS does its own cleaning of the build outputs it knows.

> The target is created using cmMakefile::AddUtilityCommand(). What would be the 
> recommended way to add a generated file, so that it is removed when cleaning ?
> Do I need to create a cmSourceFile and set it to GENERATED ?

VS needs to know that the file is the output of a custom command.
In order for CMake to tell VS about this, the file needs to be
listed as an OUTPUT in add_custom_command.

-Brad



More information about the cmake-developers mailing list