<div dir="ltr"><div><div><div><div><div>Hi All,<br><br><br></div>The way the cross-compiling is described with a separated file with the cross-compilation is working<br><br>set(COMPILER_PATH /opt/Xilinx/SDK/2013.4/gnu/arm/lin/bin/)<br>
<br>set(CMAKE_SYSTEM_NAME Linux)<br>set(CMAKE_SYSTEM_VERSION 1)<br>set(CMAKE_SYSTEM_PROCESSOR arm)<br><br># specify the cross compiler<br>set (CMAKE_C_COMPILER ${COMPILER_PATH}arm-xilinx-linux-gnueabi-gcc )<br>set (CMAKE_CXX_COMPILER ${COMPILER_PATH}arm-xilinx-linux-gnueabi-g++ )<br>
<br></div><div>I have looked into the code and see that in
CMakeSystem.cmake the toolchain parameters are added, and this is kept
as the build system. This is done even before parsing much of the
CMakeLists.txt file.<br>
<br></div><div>As such only via the -DCMAKE_TOOLCHAIN_FILE this file is updated.<br></div><div><br><br></div><div>Looking to a real environment, the same toolchain can be installed on different places.<br></div><div><br>
</div>
<div>To make cmake have advantage, for every installation ( where ever a
user may choose to install ) i have to create personalized file, so a
lot of almost same files for one cross compile tool has to be created.<br><br>
</div><div>I think it has a big advantage if the COMPILER_PATH
CROSS_COMPILER values could be set when invoking cmake and move the
cross-compile stuff into the CMakeFiles.<br><br><br></div><div>I have no
insight in the design of cmake, just in the code , if it is available
i'm willing to see how this can be added to cmake.<br>
</div><div><br></div></div><br></div>I hope cmake team is willing to have look to this.<span></span> and give some feedback.<br><br>
<br></div>Kind regards,<br><br>Wim.</div>