On 3. Jun, 2010, at 14:09 , Alexander Neundorf wrote: > On Wednesday 02 June 2010, Aeschbacher, Fabrice wrote: >> [Sorry if this message is posted twice, but first was before I subscribed >> to the list, so I'm not sure it was not rejected] >> >> >> Hi, >> >> [using cmake 2.8.1] >> >> I have a project where almost every sub-dirs should be cross-compiled >> (arm-linux-gnuueabi-gcc), but one directory containing a tool which must be >> compiled on the host (gcc) first. >> >> Can you give me a hint about the best way to achieve this with cmake? > > They need to be compiled separately. > With cmake, one buildtree is always one toolchain, using more than one > toolchain in one buildtree is not supported. > > So you first need to build the tool in a native build tree, and then build > the > rest in a cross compiling tree. > You may want to "export" the tool from the native buildtree and "import" it > again in the cross compiling tree. > > Alex
Or use an ExternalProject_Add for the native tool and then do an ADD_EXECUTABLE(tool IMPORTED) in the cross compiling top-level project. Michael _______________________________________________ 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