[CMake] [Dev] CMake 2.5 tool chain support example

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jun 12 08:44:18 EDT 2007


Hi,

On Monday 11 June 2007 18:15, Trevor Kellaway wrote:
> Alex,
>
> > Please update to current cvsand use "Generic" as
> > CMAKE_SYSTEM_NAME, there is now a Generic.cmake in cmake.
>
> I still think I should use vendor ("Freescale") instead of "Generic", as
> "Generic-chc12" may not be unique, it is just luck that two different
> vendors have differently named compilers, so using this as the
> discrimination just seems wrong (I've actually got three different
> compilers for the HC12).

In cvs HEAD there are two ways how the compiler file may be named:
either <SYSTEM>-<basename-of-the-compiler-executable>.cmake
(which would give Generic-chc12.cmake)
and additionally 
<SYSTEM>-<compiler-id>.cmake
where <compiler-id> is determined by compiling a small test program and 
encoding a compiler identification string in it, which could be 
e.g. "FreeScaleCHC12". This way the name would/will be unique.
(leaves the problem that it can't link by default).

...
> > And there is no way to have your compiler produce a linked
> > executable, e.g.
> > with some force or ignore flags or some default settings ?
> > (it doesn't have to actually be able to run on the target).
>
> The compiler flags aren't the issue, the link/locator needs a custom
> control file (see "link.prm" in the previous attachment), and defaulting
> this isn't possible without also including a copy, it is possible, but
> why bother? What benefit does the compiler test give?

Then many more of the tests in cmake just work and less manual tweaking is 
required.

Alex


More information about the CMake mailing list