[CMake] Cross compile to platform with two stage compiler.

Nils Gladitz nilsgladitz at gmail.com
Wed Jul 2 14:33:57 EDT 2014


On 02.07.2014 18:53, Eric LaFranchi wrote:
>
> Currently we have 16 different platform that we target that are a 
> combination of native compiles and cross compiles. I am adding a new 
> platform to our build system using CMake's cross compiling facility. 
> This platform is unique in that compiling a ".c" file to get an ".o" 
> file required two steps. These steps: compile the source ".c" to 
> generate a ".asm" file, then assemble that file to get the ".o" file.
>
> For other cross compiled platforms I use CMAKE_FORCE_C_COMPILER, 
> however I am not able to specify both the C compiler and assembler 
> using this macro (my understanding is one compiler as the first 
> argument). I have thought about using ADD_CUSTOM_COMMAND, however I 
> don't want to write a custom command for several thousand C source files.
>
> New ideas are greatly appreciated.
>

Could the compiler be a script that calls the actual compiler + assembler?

Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140702/f087a82a/attachment.html>


More information about the CMake mailing list