[CMake] CMake Digest, Vol 49, Issue 24
Yinyin
yinyin.pt at livemail.tw
Tue May 13 10:57:50 EDT 2008
> On Monday 05 May 2008, Yinyin wrote:
> > The attached file (multi-toolchain.patch.bz2) is a patch I made for
> > supporting multiple tool-chain in single source tree.
> > The idea is add an extra property "TARGET_ARCH" to target
> > and make the variable expansion routine lookup toolchain according to
> > TARGET_ARCH.
> > For example, if TARGET_ARCH is set as CPUX (ie:
> > SET_TARGET_PROPERTIES(my_target PROPERTIES TARGET_ARCH CPUX) ), the
> > modified expansion routine will check CMAKE_C_COMPILER_CPUX first when
> > cmake attempts to generate statements which reference to C compiler.
>
> The patch is not that small, so, I just ask...
>
> How does it deal with CMakeCache.txt (which may contain different results for
> different toolchains) ?
in CMakeCache.txt , there will have additional entries for extra tool-chains.
for example, in CMakeCache.txt of Cell HelloWorld, there are:
{{{
CMAKE_C_COMPILER:FILEPATH=/opt/cell/toolchain/bin/ppu-gcc
//The path of SPU targeted C compiler
CMAKE_C_COMPILER_SPU256K:STRING=/opt/cell/toolchain/bin/spu-gcc
//Rule for compiling C source into object code
CMAKE_C_COMPILE_OBJECT_SPU256K:STRING=<CMAKE_C_COMPILER> <DEFINES> -march=cell -mtune=cell -mea32 <FLAGS> -o <OBJECT> -c <SOURCE>
}}}
The 1st one comes for the "default" tool-chain.
The 2nd and 3rd come for the "additional" tool-chain.
These additional entries are added by toolchain file (or module included by toolchain file).
For CellBE / PS3 -
In the files I uploaded, there is a module named "UseCellBESDK3.cmake" and contained in "cellsdk3_cmake_modules.tar.bz2".
This module would declare the rules and provide additional cmake functions to support the build process for CellBE / PS3.
> What does it do with the CMakeFiles/ directory (which may contain different
> object files for different toolchains) ?
In this patch, the additional tool-chain will not be tested,
so, there is nothing to do with CMakeFiles/.
This might cause some problems if the build process would rely on the testing result.
I am trying to figure out how to perform tool-chain tests and which tests are necessary.
> It would be really nice if we would get good PS3 support for cmake :-)
I cannot agree with you anymore :)
> Alex
BTW, here are the known issues -
- must supply tool-chain file on invoking cmake (ex: cmake -DCMAKE_TOOLCHAIN_FILE="../toolchain.cmake")
even on CellBE / PS3 platform itself
- bad module naming, should use something like "Linux-gcc-CBEA"
- do not test additional tool-chains
--
Yinyin
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080513/f7108c8b/attachment.htm>
More information about the CMake
mailing list