[CMake] custom_command from cmake macros?

cOre dUmPeR marv_lush at yahoo.com
Wed Jul 9 17:14:25 EDT 2008


Hello All.

I wrote some cmake macros to generate some header files. The macros read text files and generate different headers based on an option the user determines.

Now since these are macros, the headers are generated at cmake time. I think what I really want, is for these header files to be generated at compile time, with a dependency on the text files, so that if I modify the text files in between compiles, the build system will know it has to regenerate the header files.

So, my question then is, can I somehow make my cmake macro as the COMMAND in add_custom_command?

I suppose the alternative is to rewrite my macros as perl scripts and use those scripts as the COMMAND in add_custom_command...but then I would have a dependance on perl on the build system (not to mention rewriting my macros as perl)

thanks,
-=S=-




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080709/b700d5ed/attachment-0001.htm>


More information about the CMake mailing list