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

Trevor Kellaway tkellaway at asl-electronics.co.uk
Sat Jun 16 11:27:50 EDT 2007


Alex,

> Please update to current cvsand use "Generic" as 
> CMAKE_SYSTEM_NAME, there is now a Generic.cmake in cmake.
> 
> ...
> > > SET (CMAKE_C_OUTPUT_EXTENSION 	".o" 	CACHE STRING "C ...")
> > > SET (CMAKE_CXX_OUTPUT_EXTENSION	".o"    CACHE STRING "C++ ...")
> > >
> > >
> > > Let me see if I find a way to define this later.
> 
> 
> > > SET (CMAKE_C_COMPILER_ID_RUN	TRUE)
> > > SET (CMAKE_CXX_COMPILER_ID_RUN 	TRUE)
> 
> SET (CMAKE_C_OUTPUT_EXTENSION 	".o" 	CACHE STRING "C ...")
> SET (CMAKE_CXX_OUTPUT_EXTENSION	".o"    CACHE STRING "C++ ...")
> SET (CMAKE_C_COMPILER_WORKS 	TRUE)
> SET (CMAKE_CXX_COMPILER_WORKS 	TRUE)
> ...
> SET (CMAKE_SIZEOF_VOID_P 2)
> SET (HAVE_CMAKE_SIZEOF_VOID_P TRUE)
> 
> With current cvs you should be able to move the 6 variables 
> above into Generic-chc12.cmake.
> The _ID_RUN variables still have to stay in the toolchain file.

Moved values as above and tried rebuilding with cmake version
2.5-20070615 and all is OK (example project tree attached FYI).

Note, I'm still using "Freescale" for CMAKE_SYSTEM_NAME rather than
"Generic", as I still think this makes more sense to avoid potential
clashes of compiler names from different embedded compiler vendors. A
side benefit is its much easier for a user to spot their vendor's
compiler by vendor name rather than having to find what the compiler is
called.

 - TrevK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freescale-hc12-demo.zip
Type: application/x-zip-compressed
Size: 18914 bytes
Desc: freescale-hc12-demo.zip
Url : http://public.kitware.com/pipermail/cmake/attachments/20070616/80e6a9db/freescale-hc12-demo-0001.bin


More information about the CMake mailing list