[CMake] don't auto-clean generated files?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sun Sep 6 23:09:13 EDT 2009


On 2009-09-06 17:59-0700 Aaron Turner wrote:

> I'm look for a way to tell cmake to not automatically remove certain
> auto-generated files when the 'clean' target is invoked.
>
> Basically I have:
>
>    add_custom_command(OUTPUT tcpbridge_opts.c tcpbridge_opts.h
>        COMMAND ${AUTOGEN} -L tcpedit tcpbridge_opts.def
>        DEPENDS tcpbridge_opts.def
>    )
>
> And of course, other files depend on tcpbridge_opts.[ch]
>
> The problem is that I don't want tcpbridge_opts.[ch] deleted when
> 'make clean' is run.
>
> Suggestions?



More information about the CMake mailing list