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

Eric LaFranchi eric.lafranchi at voltage.com
Wed Jul 2 12:53:28 EDT 2014


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.
Thanks, Eric

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


More information about the CMake mailing list