[CMake] Cmake + Cosmic Compiler

Alexander Neundorf a.neundorf-work at gmx.net
Fri Feb 25 10:50:32 EST 2011


On Friday 25 February 2011, MS wrote:
> Hi
> Does anybodyknow whether it would be possible to use cross compiler "Cosmic
> Compiler" together with CMake under Windows?
>
> Cosmic consists of compiler(cxs12x.exe), xgate compiler(cxxgate.exe),
> linker(clnk.exe). XGATE is another processor within one integrated circuit.
> So the build process consists of
> 1. compiler execution

Ok.

> 2. xgate compiler execution

What does this do, i.e. what is its input and what is its output ?

> 3. linker execution - that links 1. and 2. part into one binary
>
> 1. When defining cmake toolchain it asks for CXX and C compilers - but we
> have only one  C compiler(cxs12x.exe), how to force CMake to not to use C++
> compiler

Do you mean there is no Cosmic C++ compiler and the projects are C-onlys, so 
cmake should not check at all for CXX ?

Do this by adding a project() call at the toplevel with the languages you want 
to have (i.e. C):

project(MyProject C)

This way cmake will only enable C (and not CXX).

> 2. Where to set XGate compiler

I do not yet understand what this compiler does, see above.

> 3. Linker executable is not the same as compiler executable - is it
> possible to set linker variable in CMake separately from compiler variable

Linking is done via the CMAKE_C_LINK_EXECUTABLE variable (see the files in 
Modules/ for it is set for the currently supported compilers).
I.e. you can basically set this to whatever you want, including checking for a 
CMAKE_LINKER and use that one.

Alex


More information about the CMake mailing list