[CMake] How do I generate a preprocessed file?

Piotr Wyderski piotr.wyderski at gmail.com
Fri May 8 17:27:41 EDT 2009


Tyler Roscoe wrote:

> I don't know how to run the preprocessor by itself. If all you are
> trying to do is write out a file containing the contents of entry_1 ...
> entry_n, I wouldn't bother with the preprocessor;

Unfortunately not, the primary goal is to generate a preprocessed
source file. The entry list is just a way
to inform the compiler about the input files involved.
The task is easy on its own, i.e. run gcc with -E, but
it must be invoked with exactly the same CMake-generated parameters as
during regular object compilation. But
this is far beyond my knowledge of CMake.

Best regards
Piotr Wyderski


More information about the CMake mailing list