[CMake] [Dev] CMake 2.5 tool chain support example
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Jun 11 16:11:37 EDT 2007
Hi,
On Monday 11 June 2007 10:16, Trevor Kellaway wrote:
> Alex,
>
...
> > Paths in cmake files should always have forward slashes, also
> > on Windows. If they come from the "outside" (files, env vars,
> > etc.), they have to be converted using FILE(TO_CMAKE_PATH ...)
>
> Agreed, but why can't Cmake do this conversion at the point of use
> rather than forcing the user to do this?
I don't remember the details but I cmake can't always guess right whether to
convert a path or not.
So all paths in cmake scripts have to use forward slashes.
...
> > Does it work if you put piper, linker and libmaker into the
> > Generic-chc12.cmake ?
>
> I don't think so, I'll repeat the test (I ran out of time last night).
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.
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).
Bye
Alex
More information about the CMake
mailing list