On Saturday 05 September 2009, John Smith wrote: > Alexander Neundorf wrote: > > On Monday 24 August 2009, John Smith wrote: > >> [...] I have tried doing that. [...] > > > > So you have also hit that bug ? > > http://public.kitware.com/Bug/view.php?id=8392 > > Interesting, did not know of it. > > IMHO, I believe that the C compiler (or C compiler driver) should be > invoked on the assembly sources, with the exact definitions and C > compiler flags that are set at that point in the processing of the > source tree. The reason for that is definitions may be involved in > pre-processing the source file as conditionals guarding include > directives, etc. and flags may alter the code generation, e.g., -m32 may > be used to generate x86 code. > > If CMake has the concept of a settable "default" language/compiler per > project then perhaps that default compiler -- be it C or C++ -- might be > the perfect choice for building the project's assembly files. The C > compiler would use the compile definitions and C flags, whereas the C++ > compiler would use the same definitions but CXX flags. I.e., not > hard-coding the C compiler in might be a better choice. Of course, I > might be wrong, and I invite others to state their opinions on this. > > gcc -- per the man page -- does not preprocess .s files but it does so > for .S files, when invoked for compilation. With this behavior, I > believe gcc is unique. > > Other compilers which I believe know automagically what to do with .s > assembly sources are:
Thanks a lot, I added that to the bug report. Alex _______________________________________________ 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