On Monday 16 November 2009, Alexander Neundorf wrote: > On Monday 16 November 2009, Emmanuel Blot wrote: > > > If the file needs to be preprocessed, set the LANGUAGE source file > > > property to C, this should work in most cases for now. > > > > Yes they (many of them) do > > > > Is there anyway in CMake to tell something like "all .S file should be > > built with GCC" or something like this, so that developers do not have > > to cope with CMake bolts and nuts for every asm file they add to a > > project? > > > > I'm not sure to understand how to build .S files with some compiler > > option switches, and C files with other option switches. > > As an example C and C++ languages may use distinct options using > > CMAKE_C_... anc CMAKE_CXX_ flags, but how this work if I tell CMake > > that a S file is a C file, which is not? > > please have a look at the attached file and replace the > CMakeDetermineASMCompiler.cmake which comes with cmake with it. > Then enable the language "ASM" (not ASM-ATT) and then all *.s, *.S and > *.asm files should be processed by the C compiler with separate > ASM-specific flags. Let me know if you think this approach makes sense > (i.e. use the C compiler for asm files, and ASM-ATT if they are really > plain assembler files with no preprocessing etc.)
That's the respective bug report: http://public.kitware.com/Bug/view.php?id=8392 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