[CMake] How do I generate a preprocessed file?
Tyler Roscoe
tyler at cryptio.net
Fri May 8 18:30:06 EDT 2009
On Fri, May 08, 2009 at 11:27:41PM +0200, Piotr Wyderski wrote:
> 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.
I don't know of a single place to gather all the flags CMake will pass
to your compiler. You can probably cobble together the important bits
from some of the variables described here:
http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Variables%20for%20Languages
get_target_properties() might also be of use.
good luck,
tyler
More information about the CMake
mailing list