[cmake-developers] Reg: Tool chain file for cross compiler

Vinit V. Parundekar Vinit.Parundekar at kpit.com
Mon Feb 3 23:03:22 EST 2014


Hi everyone,

Greetings

I am using CMake for cross compiler, freescale.
I've written a toolchain file for it but it does not detect the linker.
It is important to note here is linker can be invoked through the command line tool by invoking the exe 'mwldeppc'.


When I check the CMakeCache.txt I can find the
//Path to a program.
CMAKE_LINKER:FILEPATH=CMAKE_LINKER-NOTFOUND

Tool chain source code,

#### Change other tools in toolchain

set(CMAKE_AR "${AR_EXE}" CACHE FILEPATH "CW archiver" FORCE)
set(LINKER "${LNK_EXE}" CACHE FILEPATH "cw linker" FORCE)

SET (CMAKE_AR mwldeppc)
SET (LINKER mwldeppc)


set(CMAKE_EXE_LINKER_FLAGS_INIT   "${CMAKE_EXE_LINKER_FLAGS_INIT}")

#mwcc -c $(FILES) $(INCLUDES) $(C_OPTIONS) $(OPTIONS)
SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>")
SET(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> -library -o <TARGET> <OBJECTS>")

#This is not working correctly yet
SET(CMAKE_C_LINK_EXECUTABLE "${LINKER} <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")

It would be helpful if you give me guidance/pointers where I am doing wrong.

Regards,
Vinit Parundekar
Greener the better; Save paper save Earth!!

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140204/114187a9/attachment-0001.html>


More information about the cmake-developers mailing list