[CMake] Cmake and TI cl6x compiler

Alexander Neundorf a.neundorf-work at gmx.net
Tue May 25 15:31:33 EDT 2010


On Monday 24 May 2010, Allan Nielsen wrote:
> I'am not sure about the manual...
>
> But if running --halp on the compiler it says one could use -o=<output> but
> this option does not work... when using it it seems like it is confusion it
> with the -O option. Therefore I have giving up on this.

Weird. Are you sure on this ?

> By grepping the source code of cmake I found the option I were looking for.
> It is simply named: <OBJECT_DIR>
>
> My toolchain file now looks like:
> set (CMAKE_SYSTEM_NAME   Generic)
> set (CMAKE_C_COMPILER    /opt/TI/C6000CGT/bin/cl6x)
> set (CMAKE_STRIP               /opt/TI/C6000CGT/bin/strip6x)
>
> set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
>
> set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
> set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
>
> set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <OBJECTS> -mv6400 -O3 -z -c
> -w -x -l/opt/TI/C6000CGT/lib/rts64plus.lib <FLAGS> <CMAKE_C_LINK_FLAGS>
> <LINK_FLAGS> -o <TARGET>")
> set(CMAKE_C_COMPILE_OBJECT  "<CMAKE_C_COMPILER> -c -ppa -eo=.c.obj
> -fr=<OBJECT_DIR> -mv6400 <DEFINES> <FLAGS> <SOURCE>")
>
> Now i need to figure out how to disable the CXX cmake is running... anybody
> know how to do that?

You mean how to disable the check for the C++ compiler ?

Insert 
project(NameOfYourProject C )
at the top of your toplevel CMakeLists.txt, then only the language "C" will be 
enabled, but not CXX.

Alex


More information about the CMake mailing list