[CMake] Definiting output extension for cross-compilation

Emmanuel Blot eblot.ml at gmail.com
Thu Oct 23 09:21:19 EDT 2014


Hi,

How to tell CMake to use '.o' output object file (instead of the
Windows' .obj forced alternative) when cross-compiling ?

SET (CMAKE_SYSTEM_NAME Generic)
...
SET (CMAKE_C_OUTPUT_EXTENSION .o)

has no effect from a project file.

forcing SET (UNIX 1) does work, but this is a terrible workaround

Thanks,
Manu


More information about the CMake mailing list