[cfe-dev] is configure+make dead yet?

Bill Hoffman bill.hoffman at kitware.com
Thu Jun 21 13:55:11 PDT 2012


On 6/21/2012 4:45 PM, Anton Korobeynikov wrote:
> Hi Bill,
>
>> Hi,  Bill Hoffman from the CMake team.  Just wanted to add a bit to
>> this.  CMake has support for cross compiling:
>>
>> http://www.cmake.org/Wiki/CMake_Cross_Compiling
> There are no doubts that cmake does support cross compilation by
> itself, the problem is that llvm build system is a bit more complex
> than just "build everything with given compiler".
>
> In particular several libraries and tools are built in the beginning
> in order to be used later during build process. So, in
> cross-compilation case they need to be compiled for both build and
> host platform (with separate configurations), so, as it seems to me,
> just setting toolchain variable won't work.
>
Yes, the cmake cross compile support was designed with that in mind.  We 
used it to build ParaView and VTK on Cray HPC systems.  VTK creates code 
wrappers that need to be compiled and run on the host machine during the 
build, but also sometimes need to be built on the target platform for 
install.   The way this is done is with imported and exported targets in 
CMake. You need to create a host build tree and build the host only 
stuff, then you create a second build tree to build the target stuff. 
There is some setup that would need to be done in the project, but it 
should not be major.


-Bill

-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573





More information about the cfe-dev mailing list