[CMake] patch for supporting multiple toolchain in single source tree

Alexander Neundorf a.neundorf-work at gmx.net
Wed May 7 17:13:47 EDT 2008


On Monday 05 May 2008, Yinyin wrote:
> Hi there,
>
>
>
> 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) ?
What does it do with the CMakeFiles/ directory (which may contain different 
object files for different toolchains) ?

It would be really nice if we would get good PS3 support for cmake :-)

Alex


More information about the CMake mailing list