[cmake-developers] ADDITIONAL_MAKE_CLEAN_FILES only works in Makefile generators / automoc cleaning problem
Alexander Neundorf
neundorf at kde.org
Mon Apr 29 15:05:47 EDT 2013
Hi,
in automoc, for every target foo a foo_automoc target is created, and for each
of those a file foo_automoc.cpp is created.
When this file does not exist, automoc reruns and all moc files should be
regenerated.
To achieve this, I added this file in cmQtAutomoc.cxx to the
ADDITIONAL_MAKE_CLEAN_FILES property, so it is removed on make clean.
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 ?
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 ?
Alex
More information about the cmake-developers
mailing list