CMake issueshttps://gitlab.kitware.com/cmake/cmake/-/issues2021-09-24T11:07:22-04:00https://gitlab.kitware.com/cmake/cmake/-/issues/12521XMOS Toolchain Support2021-09-24T11:07:22-04:00Kitware RobotXMOS Toolchain SupportThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=12521). Further discussion may take place here.
---
I've written support basic support files for the [XMOS-toolchain](https://www.xm...This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=12521). Further discussion may take place here.
---
I've written support basic support files for the [XMOS-toolchain](https://www.xmos.com/products/development-tools) 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.
---
[XMOS-Toolchain.zip](/uploads/8671ff1f698a62f88989ee5ca3714331/XMOS-Toolchain.zip)