[cmake-developers] QNX QCC and _CMAKE_TOOLCHAIN_PREFIX

Brad King brad.king at kitware.com
Tue Sep 10 10:38:40 EDT 2013


On 08/07/2013 11:56 AM, Stephen Kelly wrote:
> When cross-compiling with g++, the _CMAKE_TOOLCHAIN_PREFIX is set by 
> examining the name of the compiler in CMakeDetermineCXXCompiler.cmake. 

Yes, that's a hack specific to GNU conventions.  As you pointed out
later in your message there is no Clang handling either.

> However, currently the CMAKE_CXX_COMPILER_TARGET needs to be of the form 
> gcc_nto<arch>, not just nto<arch>, so the QNX specific code in 
> CMakeDetermineCXXCompiler.cmake would have to account for that, and other 
> possible suffixes (the version is optional):
> 
>  stephen at hal:~/bbndk/host_10_1_0_132/linux/x86/usr/bin$ ./QCC -V
>  cc: targets available in 
> /home/stephen/bbndk/host_10_1_0_132/linux/x86/etc/qcc:
>         4.6.3,gcc_ntoarmv7le_gpp
>         4.6.3,gcc_ntox86_gpp
>         4.6.3,gcc_ntox86_cpp
>         4.6.3,gcc_ntoarmv7le_cpp-ne
>         4.6.3,gcc_ntoarmv7le
>         4.6.3,gcc_ntox86_cpp-ne
>         4.6.3,gcc_ntox86        (default)
>         4.6.3,gcc_ntoarmv7le_cpp
> 
> Can I extend the CMakeDetermineCXXCompiler.cmake with handling for that?

This is tied to the revert of 2d9ec1da which dropped the
CMAKE_<LANG>_COMPILER_TARGET variables prior to release:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7705

I think both that variable and the toolchain prefix selection
can be brought back in together.  However, the variable will
have to be introduced in a way that addresses the concerns
raised in the above-linked thread.

-Brad



More information about the cmake-developers mailing list