[CMake] codesourcery integration

Eric Noulard eric.noulard at gmail.com
Wed Nov 17 12:48:31 EST 2010


2010/11/17 Andrea Galeazzi <Galeazzi at korg.it>:
> I'm facing the problem of using the cross compile toolchain of CodeSourcery.
> My host system in Windows and my target is ARM-Linux.
> I red this tutorial http://www.cmake.org/Wiki/CMake_Cross_Compiling and I
> tried to do something similar:
> # this one is important
> SET(CMAKE_SYSTEM_NAME Linux)
> #this one not so much
> SET(CMAKE_SYSTEM_VERSION 1)
>
> # specify the cross compiler
> SET(CMAKE_C_COMPILER   C:/Programmi/CodeSourcery/Sourcery G++
> Lite/bin/arm-none-linux-gnueabi-gcc.exe)
> SET(CMAKE_CXX_COMPILER C:/Programmi/CodeSourcery/Sourcery G++
> Lite/bin/arm-none-linux-gnueabi-g++.exe)

You should escape or "quote" file path with embedded space
try

SET(CMAKE_C_COMPILER   "C:/Programmi/CodeSourcery/Sourcery G++
Lite/bin/arm-none-linux-gnueabi-gcc.exe")
SET(CMAKE_CXX_COMPILER   "C:/Programmi/CodeSourcery/Sourcery G++
Lite/bin/arm-none-linux-gnueabi-g++.exe")

> # where is the target environment
> SET(CMAKE_FIND_ROOT_PATH C:/Programmi/CodeSourcery/Sourcery G++ Lite)

Same here
SET(CMAKE_FIND_ROOT_PATH "C:/Programmi/CodeSourcery/Sourcery G++ Lite")

[...]

> What's wrong?
> Furthermore if I want to use Eclipse, what kind of Eclipse makefile should I
> choose?

I think that all options concerning Eclipse + CMake are described here:
http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list