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

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jun 26 14:06:20 EDT 2007


On Saturday 23 June 2007 07:54, Trevor Kellaway wrote:
> Alex,
>
> > > > Can't you move the following three also in the toolchain file ?
> > > > If they are already in the cache, you could try the FORCE option.
> > > > SET (HC12_PIPER   "piper" CACHE STRING "Freescale tool...")
> > > > SET (CMAKE_AR     "libmaker" CACHE STRING "Tool chain
> > >
> > > library archiver")
> > >
> > > > SET (CMAKE_LINKER "linker"   CACHE STRING "Tool chain linker")
> >
> > If I move these the build breaks, I'll look into why and let you know.
>
> Tried this with the CACHE FORCE option and it works OK.

Ok, thanks.

> Latest demo project attached for any lurkers (CMakeForceCompiler.cmake
> included as it isn't yet in CMake CVS, see ReadMe.txt).

I still recommend to name the system "Generic", and now that you gave your 
toolchain an id ("FreescaleCHC12"), the cmake files can be renamed 
Generic-FreescaleCHC12-C.cmake and Generic-FreescaleCHC12-CXX.cmake (the 
settings for C and C++ are separated if you have a compiler id).

This way it is easy for the user to find the file, naming conflicts are more 
or less impossible and all platform files for systems without OS will start 
with "Generic". 

More comments at the moment ?

Bye
Alex


More information about the CMake mailing list