[CMake] Cross-compiling a static library (CMake 2.8.3)

Emmanuel Blot eblot.ml at gmail.com
Mon Jan 10 13:35:17 EST 2011


> The docs say that the signature is
> CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
> so maybe something bad happens when you give it that extra
> argument "4"? Try without "4"?

Actually, it changes nothing.

*but* if I remove the specific version number for the compiler, i.e. I define

    FIND_PROGRAM (xcc ${XTOOLCHAIN}-gcc)
instead of
    FIND_PROGRAM (xcc ${XTOOLCHAIN}-gcc-${XCC_VER})

then the proper ranlib tool is called.

In other words (I double-check with MESSAGE (STATUS "PREFIX:
${_CMAKE_TOOLCHAIN_PREFIX}")), if no GCC version is specified, the
toolchain prefix is detected, however if a specific compiler version
is specified, the toolchain prefix is empty.

There's may be a limitation with the syntax matching rule here. Should
I log a bug ?

Cheers,
Manu


More information about the CMake mailing list