[CMake] [Dev] CMake 2.5-20070519 and tool chain support
Trevor Kellaway
tkellaway at asl-electronics.co.uk
Mon May 28 10:12:20 EDT 2007
Alex,
> > SET (CMAKE_SYSTEM_INFO_FILE Windows-Freescale-HC12)
>
> I wouldn't call the file "Windows-Freescale-HC12", it sounds
> like it's a compiler for Windows
Ah, OK, but this was on your advice from a previous email (unless I
misunderstood).
I'll use "Freescale-HC12"
> > It is shame I can't specify this as a relative path to
> > CMAKE_BINARY_DIR, a lot less typing for the users as in my case I'd
> > like this to be "../toolchain".
>
> Can't specify what ?
> Giving the toolchain file as path relativ to you binary dir
> works here.
> $ cmake -DCMAKE_TOOLCHAIN_FILE=../sdcc-mcs51.cmake ..
Not the toolchain file, the CMAKE_CMODULE_PATH, if this is a relative
path this won't work when CMake starts changing directories.
The nicest solution would be for it to fallback to an ennvironment
variable.
> > IF (NOT _INCLUDED_WINDOW_FREESCALE_HC12_OPT_FILE)
> > INCLUDE ("${CMAKE_SOURCE_DIR}/Windows-Freescale-HC12-opt.cmake"
> > OPTIONAL RESULT_VARIABLE _INCLUDED_WINDOW_FREESCALE_HC12_OPT_FILE)
> > ENDIF (NOT _INCLUDED_WINDOW_FREESCALE_HC12_OPT_FILE)
>
> This part is not required, if you include a file with
> extension then it is interpreted by default as relative to
> the current source dir.
Understood.
> > A similar problem occurs in my
> "Toolchain-Freescale-HC12.cmake" where
> > I include the platform code based on the system name:
> >
> > SET (CMAKE_SYSTEM_INFO_FILE
> > ${CMAKE_SYSTEM_NAME}-Freescale-HC12)
>
> Is this with current cvs ? I changed some things last
> thursday so this file will be "configured" into the binary
> tree and so variables will be replaced with their actual
> value during the initial cmake invokation.
> Can you please check ?
I'm using an older dev version, I'll resync now and try again.
> Thanks for testing.
Thanks for the prompt feedback.
- TrevK
More information about the CMake
mailing list