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

Aaron Turner synfinatic at gmail.com
Sun Sep 6 20:59:00 EDT 2009


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?



-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin


More information about the CMake mailing list