[CMake] Newbie question: generated header file howto

Bill Hoffman bill.hoffman at kitware.com
Thu Jan 10 07:50:10 EST 2008


Pacesie wrote:
> Hello,
> 
> In my C++ program I want to auto-generate a header ( .h ) file, which is 
> included in most sources. I use ADD_CUSTOM_COMMAND to generate it, but I 
> don't know how to neatly write the dependency to it.
> 

Add the .h file as a source file of the target that uses it.

-Bill


More information about the CMake mailing list