How to preprocess the headers in cmake

21 Views Asked by At

I would like to preprocess public headers of a target in a same way when they are getting preprocessed at the compilation of the target.

It is possible to get the preprocessed source files of a target using /P for msvc or -E for gcc.

I'm also able to preprocess the header files using add_custom_command but I don't know what I need for to preprocess them same as they are preprocessed in the compilation of the target.

0

There are 0 best solutions below