[cmake-developers] CMAKE_<LANG>_COMPILER_TARGET

Stephen Kelly steveire at gmail.com
Fri Aug 9 07:11:40 EDT 2013


Brad King wrote:

> Steve,
> 
> Have you tested this feature extensively? 

I've built some hello world size projects and I've built gammaray with qcc 
with a toolchain file defining it.

> Does it follow through try_compile checks and such? 

If the CMAKE_<LANG>_COMPILER_TARGET are set in the toolchain file, that 
works, because I think the cmCoreTryCompile uses the toolchain file somehow?

If -DCMAKE_<LANG>_COMPILER_TARGET is set on the command line, that is indeed 
not forwarded.

> From a quick read of the code it
> does not appear to be completely implemented in that respect.
> 
> Should we revert it for this release?  Like CMAKE_SYSROOT it is
> oriented toward cross-compiling and exposes a new user interface
> that doesn't seem mature.

I have just found another bug in it and pushed 
fix-COMPILER_TARGET-compiler-ABI to my clone to fix it.

On its own it's not making cross compiling much easier, so yes, I'd say 
revert it and re-add it later along with CMAKE_SYSROOT so that both can be 
tested together and expected to work fully (along with add-
COMPILER_EXTERNAL_TOOLCHAIN in my clone for clang). 

Thanks,

Steve.





More information about the cmake-developers mailing list