Hi,

(CCing the list.)

2011/1/10 Emmanuel Blot <eblot...@gmail.com>:
>> When I cross compile I do "set(CMAKE_C_COMPILER arm-linux-gcc)"
>> in a toolchain file and CMake automatically finds ranlib (and other
>> toolchain utilities) using the prefix from the C compiler. How do you
>> setup CMake for cross-compilation?
>
> INCLUDE (CMakeForceCompiler)
> CMAKE_FORCE_C_COMPILER (arm-eabi-gcc-4.5.2 GNU 4)

I haven't used that one before. The docs say it should be used
when CMake is not able to detect the compiler ID. Is that the case here?
Have you tried "set(CMAKE_C_COMPILER arm-linux-gcc)"?

> Maybe the version number is the source of the trouble ?

The docs say that the signature is
CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
so maybe something bad happens when you give it that extra
argument "4"? Try without "4"?

Best regards,
Bjørn Forsman

>> Have you read http://cmake.org/Wiki/CMake_Cross_Compiling ?
> Not for a while, however I've been using CMake for cross compiling
> since early releases (2.5.x), so maybe the syntax changed a bit since.
_______________________________________________
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

Reply via email to