[CMake] How to generate preprocessed file?
Marcel Loose
loose at astron.nl
Mon Mar 23 09:13:17 EDT 2009
Thanks,
I didn't know it was that simple. The thing is that I ran 'make help' in
the top-level build directory and it didn't show any .i target. However,
after I descended into the build directory of the actual source I *did*
get to see these .i targets. Wonderful!
Best regards,
Marcel Loose.
On Mon, 2009-03-23 at 07:56 -0400, Bill Hoffman wrote:
> Marcel Loose wrote:
> > Hi all,
> >
> > I was trying to figure out how to generate a preprocessed file. By
> > browsing the CMake modules and by printing all CMake variables I
> > discovered CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE variables. That
> > suggests that there is support for generating preprocessed files.
> >
> > However, there's no mention of these variables in the documentation, or
> > the FAQ or the Wiki. How should I tell CMake to add rules to my Unix
> > Makefiles for generating preprocessed (.i) files?
> >
>
> Just run make foo.i in the directory of the target that contains foo.c.
> If you run make help in any directory it will list these types of targets.
>
> -Bill
More information about the CMake
mailing list