<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>> On Monday 05 May 2008, Yinyin wrote:<br>> > The attached file (multi-toolchain.patch.bz2) is a patch I made for<br>> > supporting multiple tool-chain in single source tree.<br>> > The idea is add an extra property "TARGET_ARCH" to target<br>> > and make the variable expansion routine lookup toolchain according to<br>> > TARGET_ARCH.<br>> > For example, if TARGET_ARCH is set as CPUX (ie:<br>> > SET_TARGET_PROPERTIES(my_target PROPERTIES TARGET_ARCH CPUX) ), the<br>> > modified expansion routine will check CMAKE_C_COMPILER_CPUX first when<br>> > cmake attempts to generate statements which reference to C compiler.<br>> <br>> The patch is not that small, so, I just ask...<br>> <br>> How does it deal with CMakeCache.txt (which may contain different results for <br>> different toolchains) ?<br><br>in CMakeCache.txt , there will have additional entries for extra tool-chains.<br><br>for example, in CMakeCache.txt of Cell HelloWorld, there are:<br>{{{<br>CMAKE_C_COMPILER:FILEPATH=/opt/cell/toolchain/bin/ppu-gcc<br><br>//The path of SPU targeted C compiler<br>CMAKE_C_COMPILER_SPU256K:STRING=/opt/cell/toolchain/bin/spu-gcc<br><br>//Rule for compiling C source into object code<br>CMAKE_C_COMPILE_OBJECT_SPU256K:STRING=<CMAKE_C_COMPILER> <DEFINES> -march=cell -mtune=cell -mea32 <FLAGS> -o <OBJECT> -c <SOURCE><br>}}}<br><br>The 1st one comes for the "default" tool-chain.<br><br>The 2nd and 3rd come for the "additional" tool-chain.<br><br><br>These additional entries are added by toolchain file (or module included by toolchain file).<br><div style="text-align: left;"><br><br>For CellBE / PS3 -<br><br>In the files I uploaded, there is a module named "UseCellBESDK3.cmake" and contained in "<a href="http://www.sharebig.com/d/srptnwxxx/0C0MZov481F4B7D0D/cellsdk3_cmake_modules.tar.bz2.htm">cellsdk3_cmake_modules.tar.bz2</a>".<br></div><br>This module would declare the rules and provide additional cmake functions to support the build process for CellBE / PS3.<br><br><br><br><br>> What does it do with the CMakeFiles/ directory (which may contain different <br>> object files for different toolchains) ?<br><br>In this patch, the additional tool-chain will not be tested,<br><br>so, there is nothing to do with CMakeFiles/.<br><br><br>This might cause some problems if the build process would rely on the testing result.<br><br>I am trying to figure out how to perform tool-chain tests and which tests are necessary.<br><br><br><br>> It would be really nice if we would get good PS3 support for cmake :-)<br><br>I cannot agree with you anymore :)<br><br><br><br>> Alex<br><br><br>BTW, here are the known issues -<br><br>- must supply tool-chain file on invoking cmake (ex: cmake -DCMAKE_TOOLCHAIN_FILE="../toolchain.cmake") <br> even on CellBE / PS3 platform itself<br><br>- bad module naming, should use something like "Linux-gcc-CBEA"<br><br>- do not test additional tool-chains<br><br><br><br><br><br>--<br>Yinyin<br><br><br><br><br><br><br /><hr />Get news, entertainment and everything you care about at Live.com. <a href='http://www.live.com/getstarted.aspx ' target='_new'>Check it out!</a></body>
</html>