On Wednesday 07 April 2010, Luigi Grilli wrote: > I'm trying to cross compile for ARM with this command:
Not sure, but I would put all the -Dsomething=foo _before_ the path to the source directory: > cmake . -DCMAKE_BUILD_TYPE=DEBUG > -DCMAKE_TOOLCHAIN_FILE=arm-gcc3.4.5.cmake > > > > Here is my toolchain file: This line really should not be necessary: > INCLUDE(CMakeForceCompiler) > > > > # this one is important > > SET(CMAKE_SYSTEM_NAME Linux) > > set(CMAKE_SYSTEM_PROCESSOR arm) > > > > #this one not so much > > SET(CMAKE_SYSTEM_VERSION 1) > > > > # specify the cross compiler > > SET(CMAKE_C_COMPILER arm-linux-gcc) > > SET(CMAKE_CXX_COMPILER arm-linux-g++) > > > > # where is the target environment > > SET(CMAKE_FIND_ROOT_PATH /my-path-to-toolchain/arm-unknown-linux-gnu) > > > > # search for programs in the build host directories > > SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) > > # for libraries and headers in the target directories > > SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) > > SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > > > > > > My cmake version is 2.8.0 > > > > Anyway the "-DCMAKE_TOOLCHAIN_FILE" option seems to be completely > ignored (for example if I try to set a file that doesn't exists cmake > doesn't complain with that). In fact it always does the makefile for the > host system and not the target. > > > > Is the toolchain manament different from cmake 2.6? I read the > documentation twice and they say to do exactly this way. > > Any help will be appreciated. > > Thanks _______________________________________________ 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