[CMake] Cross-compiling: Cmake compiler and ABI check don´t work

Schmid Alexander A.Schmid at de.ccv.eu
Fri Feb 11 01:42:51 EST 2011


Hi,

 

I am working with CMake 2.8.3 and trying to set up a cross-compiling toolchain for an ARMCC that runs on a Windows system.

 

What I´ve done up to now is that I set up a toolchain file that I am using in combination with nmake makefiles.

This file defines:

 

SET( CMAKE_C_COMPILER   "${ARMCC_ROOT}/armcc.exe" )

SET( CMAKE_CXX_COMPILER "${ARMCC_ROOT}/armcc.exe" )

 

# specify the compile command

SET( CMAKE_C_FLAGS   <SOME FLAGS HERE> )

SET( CMAKE_CXX_FLAGS <SOME FLAGS HERE>)

 

# specify the linker and its options for creating static libraries:

SET( CMAKE_AR_FLAGS "${SOME_LINKER_FLAGS} -o <TARGET> <OBJECTS>")

SET( CMAKE_CXX_CREATE_STATIC_LIBRARY "${MY_LINKER} ${CMAKE_AR_FLAGS}")

SET( CMAKE_C_CREATE_STATIC_LIBRARY "${MY_LINKER} ${CMAKE_AR_FLAGS}")

 

# specify the linker for linking applications

SET( CMAKE_C_LINK_EXECUTABLE   "${MY_LINKER} ${MY_LINKER_FLAGS_APP} " )

SET( CMAKE_CXX_LINK_EXECUTABLE "${MY_LINKER} ${MY_LINKER_FLAGS_APP}" )

 

Now comes the interesting part...

 

When I start the cmake "first-time" configuration process on a clean build directory, 

-          The compiler detection build uses the settings above

-          The "compiler works" build does not use them and fails

-          The ABI check build does not use them and fails

 

 

Do you have a hint for me what is going wrong? 

As the compiler detection build succeeds and uses the flags, I assume that it can be a bug in CMake´s detection modules.

What do you think?

 

Regards,

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110211/04919c3b/attachment-0001.htm>


More information about the CMake mailing list