How do I make build rules in cmake to preprocess lazy C++ .lzz files that generate .h and .cpp files?
What I'd like to do is write just Lazy C++ .lzz files and then have lzz run before a build to generate .cpp and .h files that will be built into the final application, sort of like how moc works with Qt. Is there any way to do this? Here is an example of how to do this... First you need to find the lzz program, for that use the find_program command: find_program(LZZ_COMMAND lzz) This sets LZZ_COMMAND to the path of the compiler. Then use a CMake custom command to compile the LZZ file to their C++ header/implementation files: add_custom_command( OUTPUT ${output} COMMAND ${LZZ_COMMAND} -o $