MantisBT - CMake
View Issue Details
0012521CMakeCMakepublic2011-10-16 07:522016-06-10 14:31
Bernhard Sputh 
Alex Neundorf 
normalfeatureN/A
closedmoved 
XMOSMS-Windows7
CMake 2.8.5 
 
0012521: XMOS Toolchain Support
I've written support basic support files for the XMOS-toolchain [1] running on top of MS-Windows 7 (linux should work as well, but I've not yet tested this).

To get the Assembler supported in the XMOS toolchain the following three lines have to be inserted into the file CMakeDetermingASMCompiler.cmake:

LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XMOS )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XMOS "--version")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XMOS "XMOS Limited")

The actual compiler support is based on the GNU.cmake files provided by CMake, due to the XMOS toolchain being based on LLVM, which in turn is based on GCC, at least when it comes to the command line options. Since C++ is not supported by the XMOS toolchain, I've created a file that aborts the build, to prevent trouble later.

Find the following files attached:
- XMOS.cmake: A slightly adjusted GNU.cmake
- XMOS-ASM.cmake: Setting the file extensions for XMOS assembler.
- XMOS-C.cmake: A slightly adjusted GNU-C.cmake.
- XMOS-CXX.cmake: The file that prevents accidential inclusion of C++ in an XMOS project.
- CMakeDetermingASMCompiler.cmake: My modified version of the file

Due to the XMOS toolchain not being able to compile without having been given a valid topology, which is project specific, I force the compiler in my toolchain files. I use the following lines to connect to the XMOS toolchain:

INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(xcc XMOS)
CMAKE_FORCE_CXX_COMPILER(xcc XMOS)

Keep in mind that this is early days for the toolchain support, it will be extended in the future.

[1] https://www.xmos.com/products/development-tools [^]
Only tested under MS-Windows and with CMake 2.8.5, and the XMOS toolchain version 11.2.2
No tags attached.
zip XMOS-Toolchain.zip (5,224) 2011-10-16 07:52
https://public.kitware.com/Bug/file/4091/XMOS-Toolchain.zip
Issue History
2011-10-16 07:52Bernhard SputhNew Issue
2011-10-16 07:52Bernhard SputhFile Added: XMOS-Toolchain.zip
2011-10-16 07:57Alex NeundorfAssigned To => Alex Neundorf
2011-10-16 07:57Alex NeundorfStatusnew => assigned
2012-08-13 14:31Alex NeundorfNote Added: 0030573
2012-08-13 14:31Alex NeundorfStatusassigned => backlog
2016-06-10 14:28Kitware RobotNote Added: 0041918
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030573)
Alex Neundorf   
2012-08-13 14:31   
I won't be able to work on this for 2.8.10.
(0041918)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.