[CMake] CMake-2.6 CMAKE_TOOLCHAIN_FILE
Alexander Neundorf
a.neundorf-work at gmx.net
Wed May 14 18:14:00 EDT 2008
Hi Andreas,
On Wednesday 14 May 2008, you wrote:
> Hi,
> Thank you for all these hints. Are details like that described in the
> Mastering CMake book?
Yes and no.
The process how the system and the compiler are determined is described, but
not every implementation detail of the files.
> I tracked it down to:
> CMakeDetermineCCompiler.cmake: line 97:
> IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
> GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME_WE)
> MESSAGE(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
> MESSAGE(STATUS "COMPILER_BASENAME: ${COMPILER_BASENAME}")
> IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc")
> STRING(REGEX REPLACE "^(.+-)g?cc" "\\1" _CMAKE_TOOLCHAIN_PREFIX
> "${COMPILER _BASENAME}")
> ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc")
> ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
>
> MESSAGE(STATUS "TOOLCHAIN: ${_CMAKE_TOOLCHAIN_PREFIX}")
>
>
> It prints
> CMAKE_C_COMPILER:
> c:/work/QNX632/host/win32/x86/usr/bin/arm-unknown-nto-qnx6.3.0-gcc.exe
> COMPILER_BASENAME: arm-unknown-nto-qnx6
> TOOLCHAIN:
>
> Seems like get_filename_component takes the first dot to determine the
> extension!
Yes, it does.
Anyway, does the attached patch (against cvs HEAD) work for you ?
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toolchain_name.patch
Type: text/x-diff
Size: 5492 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080515/ac142f5f/attachment.patch>
More information about the CMake
mailing list