Piotr Wyderski wrote:
Tyler Roscoe wrote:

Thinking about this more, is there anything handed off to the compiler
that affects the preprocessor other than definitions (-D flags)?

Yes, a lot of them: include directories specification,
optimization flags (they also work as -D directives,
e.g. they define __SSE2__ or not), language error
handling mode (e.g. --Wno-pmf-conversion) etc.
In fact I need the entire command line with option -E
attached at the end. I would be happy to grab it from
any C++-dependent object file (as they all use the
same set of options).

What other flags do you really need?

Well, pretty everything except "-o". Perfect matching
is of key importance, as the result of preprocessing
is a form of environment for a dynamic code generator.
I need precisely the same set of interface definitions
as the hand-compiled objects use.

I am also very surprised that this problem is so hard
in CMake -- I thought there is a single variable specifying
a template for a given target, e.g. *.cpp => *.o


You do know about make foo.i where CMake will do this for you, right?

If you run make help in any binary directory, it will give the list of .i targets.

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to