[CMake] How to use different assemblers in single build?

Alexander Neundorf a.neundorf-work at gmx.net
Sat May 12 04:37:46 EDT 2012


On Saturday 12 May 2012, Alexey Istomin wrote:
> > Yes.
> > You need to duse two different assembler "dialects", each "dialect"
> > counts as a separate language to cmake, so you can have many in
> > parallel. So you should add e.g. a ASM-DSP dialect, and set the language
> > of the source files to ASM-DSP. This this assembler will be invoked on
> > these files.
> > Adding an assembler dialect is not hard, you need just a few tiny files:
> > http://www.cmake.org/Wiki/CMake/Assembler
> > This page is slightly out of date, but the documentation how to add a new
> > assembler is still valid. Just have a look at the Modules/ directory for
> > the ASM-related files, you should see how this works.
> > 
> > Alex
> 
> Thanks a lot, Alex.
> I done some experiments. It looks like dsp-asm sources should have a
> different file extension? Can CMake select specific asm-compiler depends
> on subdir instead of file extesion?

Not per directory, but per file.
You can use set_source_files_properties(... LANGUAGE ASM_DSP)

This should work.

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120512/6c9849e2/attachment-0001.htm>


More information about the CMake mailing list